SA-MP Forums Archive
undefined symbol "playerid" - 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)
+--- Thread: undefined symbol "playerid" (/showthread.php?tid=610531)



undefined symbol "playerid" - CarRamper - 25.06.2016

Code
Код:
public OnGameModeExit()
{
   	IRC_Quit(gBotID[0], "Bot exiting");
	IRC_Quit(gBotID[1], "Bot exiting");
	IRC_Quit(gBotID[2], "Bot exiting");
	IRC_Quit(gBotID[3], "Bot exiting");
    IRC_Quit(gBotID[4], "Bot exiting");

	IRC_DestroyGroup(gGroupID);

    
	for(new i=0;i<MAX_PLAYERS;i++)
	 if(fexist(UserPath(playerid)))
    {
        new INI:File = INI_Open(UserPath(playerid));
        INI_SetTag(File,"data");
    INI_WriteInt(File,"Cash",GetPlayerMoney(i));
    INI_WriteInt(File,"Admin",PlayerInfo[i][pAdmin]);
    INI_WriteInt(File,"Kills",PlayerInfo[i][pKills]);
    INI_WriteInt(File,"Deaths",PlayerInfo[i][pDeaths]);
    INI_WriteInt(File,"WantedLevel",GetPlayerWantedLevel(i));
    INI_WriteInt(File,"Vip",PlayerInfo[i][pVip]);
    INI_WriteInt(File,"Score",GetPlayerScore(i));
    INI_WriteInt(File,"Condoms",PlayerInfo[i][pCondoms]);
    INI_WriteInt(File,"Banned",PlayerInfo[i][pBanned]);
    INI_WriteInt(File,"Jailed",PlayerInfo[i][pJailed]);
    INI_WriteInt(File,"Drugs",PlayerInfo[i][pDrug]);
    INI_WriteInt(File,"Nopm",PlayerInfo[i][pNopm]);
    INI_WriteInt(File,"Bank",PlayerInfo[i][pBank]);
    INI_WriteInt(File,"Sausages",PlayerInfo[i][pSausage]);
    INI_WriteInt(File,"PassChange",PlayerInfo[i][pPassChange]);
    INI_WriteInt(File,"Mute",PlayerInfo[i][pMuted]);
    INI_Close(File);
   	TextDrawHideForPlayer(i,WantedLvlTxd[i]);
	TextDrawHideForPlayer(i,DollarTxd);
	TextDrawHideForPlayer(i,DrugTxd[i]);
    }

    TextDrawHideForAll(CopsRules0);
	TextDrawDestroy(CopsRules0);
	TextDrawHideForAll(CopsRules1);
	TextDrawDestroy(CopsRules1);
	TextDrawHideForAll(CopsRules2);
	TextDrawDestroy(CopsRules2);
	TextDrawHideForAll(CopsRules3);
	TextDrawDestroy(CopsRules3);
	TextDrawHideForAll(CopsRules4);
	TextDrawDestroy(CopsRules4);
	return 1;
}
error
Код:
C:\Users\Anurag\Desktop\Most Wanted Cops and Robbers v1.1\gamemodes\MWCNR.pwn(3446) : error 017: undefined symbol "playerid"
C:\Users\Anurag\Desktop\Most Wanted Cops and Robbers v1.1\gamemodes\MWCNR.pwn(3448) : error 017: undefined symbol "playerid"
error Line
Код:
 if(fexist(UserPath(playerid)))
    {
        new INI:File = INI_Open(UserPath(playerid));



Re: undefined symbol "playerid" - SyS - 25.06.2016

OnGameModeExit
this call back have no arguement playerid


Re: undefined symbol "playerid" - cdoubleoper - 25.06.2016

Код:
	 if(fexist(UserPath(playerid)))
    {
        new INI:File = INI_Open(UserPath(playerid));
Change 'playerid' to 'i'


Re: undefined symbol "playerid" - SyS - 25.06.2016

and also use foreach next time