SA-MP Forums Archive
HELP!!!!!!!!!! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: HELP!!!!!!!!!! (/showthread.php?tid=264635)



HELP!!!!!!!!!! - Loading... - 26.06.2011

I get This Error

Код:
C:\Users\Family\Desktop\Freedem\gamemodes\Free.pwn(283) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
My Code Where It Is

Код:
public OnGameModeExit()
{
    SetPlayerTeamFromClass(playerid, classid);
	return 1;
}



Re: HELP!!!!!!!!!! - linuxthefish - 26.06.2011

OnGameModeExit doesn't have a playerid value. You would need to loop through all the players.


Re: HELP!!!!!!!!!! - iPLEOMAX - 26.06.2011

Well, OnGameModeExit doesn't have playerid defined. So you cannot use it there.

If you still want to do something, Try this method:

pawn Код:
public OnGameModeExit()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && !IsPlayerNPC(i))
        {
            // Put your hings here and replace "playerid" with "i".
        }
    }
}
But i think, putting SetPlayerTeamFromClass would barely do anything there..