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=459245)



Undefined Symbol "playerid" - Beckett - 21.08.2013

------


Re: Undefined Symbol "playerid" - JimmyCh - 21.08.2013

pawn Код:
public SavingTimer(playerid)



Re: Undefined Symbol "playerid" - Beckett - 21.08.2013

------


Re: Undefined Symbol "playerid" - JimmyCh - 21.08.2013

pawn Код:
forward SavingTimer(playerid);
:3


Re: Undefined Symbol "playerid" - Beckett - 21.08.2013

------


Re: Undefined Symbol "playerid" - cray1100 - 21.08.2013

Where did you start the timer?


Re: Undefined Symbol "playerid" - Beckett - 21.08.2013

------


Re: Undefined Symbol "playerid" - Lordzy - 21.08.2013

You should add the "playerid" parameter like the above posts tells, while forwarding too.
pawn Код:
forward SavingTimer(playerid);
public SavingTimer(playerid)
{
       
        new INI:file = INI_Open(Path(playerid));
        INI_SetTag(file,"Player's Data");
        INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]);
        INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]);
        INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
        INI_WriteInt(file,"Scores",GetPlayerScore(playerid));
        INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);
        INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
        INI_Close(file);
    return 1;
}
If you've used this callback in any timers, you must add the parameter too in it.
pawn Код:
//Example:
SetTimerEx("SavingTimer", 190000, true, "d", playerid);



Re: Undefined Symbol "playerid" - cray1100 - 21.08.2013

Quote:
Originally Posted by Lordz™
Посмотреть сообщение
You should add the "playerid" parameter like the above posts tells, while forwarding too.
pawn Код:
forward SavingTimer(playerid);
public SavingTimer(playerid)
{
       
        new INI:file = INI_Open(Path(playerid));
        INI_SetTag(file,"Player's Data");
        INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]);
        INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]);
        INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
        INI_WriteInt(file,"Scores",GetPlayerScore(playerid));
        INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);
        INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
        INI_Close(file);
    return 1;
}
If you've used this callback in any timers, you must add the parameter too in it.
pawn Код:
//Example:
SetTimerEx("SavingTimer", 190000, true, "d", playerid);
Lol, beat me to it... And the SetTimerEx is probably what your looking for..


Re: Undefined Symbol "playerid" - Beckett - 21.08.2013

------