undefined symbol "playerid"
#1

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));
Reply
#2

OnGameModeExit
this call back have no arguement playerid
Reply
#3

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

and also use foreach next time
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)