[Support] unresolved external errors?

Topic created · 7 Posts · 69 Views
  • I'm trying to add the zombie counter script. What is this error trying to tell me i'm doing wrong kevin.PNG

  • More details of your code would be needed to see what the error is.

    But I implemented the Zombies counter on my server, you can guide yourself from here:
    https://forum.plutonium.pw/topic/403/zombie-counter-help/2

  • @Kalitos I'm new to this, it says in the original post you linked call drawzombiescounter() in your init function so i've ended up trying to thread it but i dont even know if im anywhere close to being correct haha. ```
    code_text

    #include common_scripts\utility;
    #include maps\mp\zombies\_zm;
    #include maps\mp\zombies\_zm_utility;
    
    init()
    {
    	level.clientid = 0;
    	level.perk_purchase_limit = 9;
    	level thread onplayerconnect();
    	level thread drawzombiescounter();
    }
    
    onplayerconnect()
    {
    	for ( ;; )
    	{
    		level waittill( "connecting", player );
    		player.clientid = level.clientid;
    		player thread onplayerspawned();
    		level.clientid++;
    	}
    }
    
    onplayerspawned()
    {
    	level endon( "game_ended" );
            self endon( "disconnect" );
    	
    	for(;;)
    	{
    		self welcome();
    	}
    }
    
    welcome()
    {
        self waittill( "spawned_player" );
        self maps/mp/zombies/_zm_perks::give_perk( "specialty_longersprint" );
        wait 7;
        self iprintln("^2" +self.name + "^7 , your perk limit has been removed. Have fun.");
    }
    
    drawZombiesCounter()
    {
        level.zombiesCountDisplay = createServerFontString("Objective" , 1.7);
        level.zombiesCountDisplay setPoint("RIGHT", "CENTER", 315, "CENTER");
    
        thread updateZombiesCounter();
    }
    
    updateZombiesCounter()
    {
        level endon("stopUpdatingZombiesCounter");
    
        while(true)
        {
            zombiesCount = get_current_zombie_count();
            level.zombiesCountDisplay setSafeText("Zombies: " + zombiesCount);
    
            waitForZombieCountChanged("stopUpdatingZombiesCounter");
        }
    }
    
    recreateZombiesCounter()
    {
        level notify("stopUpdatingZombiesCounter");
    
        thread updateZombiesCounter();
    }
    
    waitForZombieCountChanged(endonNotification)
    {
        level endon(endonNotification);
    
        oldZombiesCount = get_current_zombie_count();
    
        while(true)
        {
            newZombiesCount = get_current_zombie_count();
    
            if(oldZombiesCount != newZombiesCount)
            {
                return;
            }
    
            wait 0.05;
        }
    }```
    code_text
    
  • @Trizz said in unresolved external errors?:

    setSafeText

    you should change this line

    level thread drawzombiescounter();
    

    for this:

    drawzombiescounter();
    

    and this function

    setSafeText
    

    for this

    SetText
    
  • @Kalitos I tried changing it and still the same error It seems to have a problem with createserverfrontstring and setpoint

    #include common_scripts\utility;
    #include maps\mp\zombies\_zm;
    #include maps\mp\zombies\_zm_utility;
    #include maps/mp/zombies/_zm_utility;
    
    init()
    {
    	
    	level.clientid = 0;
    	level.perk_purchase_limit = 9;
    	level thread onplayerconnect();
    	drawZombiesCounter();
    }
    
    onplayerconnect()
    {
    	for ( ;; )
    	{
    		level waittill( "connecting", player );
    		player.clientid = level.clientid;
    		player thread onplayerspawned();
    		level.clientid++;
    	}
    }
    
    onplayerspawned()
    {
    	level endon( "game_ended" );
            self endon( "disconnect" );
    	
    	for(;;)
    	{
    		self welcome();
    	}
    }
    
    welcome()
    {
        self waittill( "spawned_player" );
        self maps/mp/zombies/_zm_perks::give_perk( "specialty_longersprint" );
        wait 7;
        self iprintln("^2" +self.name + "^7 , your perk limit has been removed. Have fun.");
    }
    
    drawZombiesCounter()
    {
        level.zombiesCountDisplay = createServerFontString("Objective" , 1.7);
        level.zombiesCountDisplay setPoint("RIGHT", "CENTER", 315, "CENTER");
    
        thread updateZombiesCounter();
    }
    
    updateZombiesCounter()
    {
        level endon("stopUpdatingZombiesCounter");
    
        while(true)
        {
            zombiesCount = get_current_zombie_count();
            level.zombiesCountDisplay setText("Zombies: " + zombiesCount);
    
            waitForZombieCountChanged("stopUpdatingZombiesCounter");
        }
    }
    
    recreateZombiesCounter()
    {
        level notify("stopUpdatingZombiesCounter");
    
        thread updateZombiesCounter();
    }
    
    waitForZombieCountChanged(endonNotification)
    {
        level endon(endonNotification);
    
        oldZombiesCount = get_current_zombie_count();
    
        while(true)
        {
            newZombiesCount = get_current_zombie_count();
    
            if(oldZombiesCount != newZombiesCount)
            {
                return;
            }
    
            wait 0.05;
        }
    }
    

    this is the error sssss.PNG

  • Replace this in your project:

    #include common_scripts\utility;
    #include maps\mp\zombies\_zm;
    #include maps\mp\zombies\_zm_utility;
    #include maps\mp\gametypes_zm\_hud_util;
    #include maps\mp\gametypes_zm\_hud_message;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
  • @Kalitos Those includes are going to be the death of me thankyou.

Log in to reply