SA-MP Forums Archive
[HELP] : error 017: 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] : error 017: undefined symbol "playerid" (/showthread.php?tid=127327)



[HELP] : error 017: undefined symbol "playerid" - WThieves - 12.02.2010

How do i solve this:
Quote:

: error 017: undefined symbol "playerid"




Re: [HELP] : error 017: undefined symbol "playerid" - Ricop522 - 12.02.2010

put:
for(new i=0; i<MAX_PLAYERS; i++)
{

change playerid for "i"


Re: [HELP] : error 017: undefined symbol "playerid" - [HiC]TheKiller - 12.02.2010

What callback do you use when using playerid?


Re: [HELP] : error 017: undefined symbol "playerid" - WThieves - 13.02.2010

Quote:
Originally Posted by Ricop522
put:
for(new i=0; i<MAX_PLAYERS; i++)
{

change playerid for "i"
I tried this but it made everyone in the whole server get the disease.


Re: [HELP] : error 017: undefined symbol "playerid" - WThieves - 13.02.2010

Quote:
Originally Posted by [HiC
TheKiller ]
What callback do you use when using playerid?
public ownfunction()


Re: [HELP] : error 017: undefined symbol "playerid" - Anwix - 13.02.2010

Paste the whole function


Re: [HELP] : error 017: undefined symbol "playerid" - WThieves - 13.02.2010

Quote:
Originally Posted by Anwix
Paste the whole function
public downhealth()
{
new Float:health;
GetPlayerHealth(playerid,health);
SetPlayerDrunkLevel(playerid, 50000);
SetPlayerHealth(playerid,health -0.001);
}


Re: [HELP] : error 017: undefined symbol "playerid" - Anwix - 13.02.2010

Does a timer run this function?


Re: [HELP] : error 017: undefined symbol "playerid" - [HiC]TheKiller - 13.02.2010

Use SetTimerEx or if it's not a timer make it
pawn Код:
public downhealth(playerid)
{
new Float:health;
GetPlayerHealth(playerid,health);
SetPlayerDrunkLevel(playerid, 50000);
SetPlayerHealth(playerid,health -0.001);
}



Re: [HELP] : error 017: undefined symbol "playerid" - WThieves - 13.02.2010

Quote:
Originally Posted by Anwix
Does a timer run this function?
T3 = SetTimerEx("downhealth", 1000, 1, "i", playerid);