Undefined Symbol "playerid"
#1

------
Reply
#2

pawn Код:
public SavingTimer(playerid)
Reply
#3

------
Reply
#4

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

------
Reply
#6

Where did you start the timer?
Reply
#7

------
Reply
#8

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

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..
Reply
#10

------
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)