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



undefined playerid - hvampire - 02.02.2010

Код:
public refreshsboard()
{
new score[128]; 
format(score, sizeof(score), "score ~n~ ~n~ ~n~ LS:   %i ~n~ ~n~ LV: %i", team1score, team2score);
TextDrawSetString(Textdraw2, score);
for(new i = 0; i < 50; i++) 
TextDrawShowForPlayer(playerid, TextDraw2);
return 1;
}
line : TextDrawShowForPlayer(playerid, TextDraw2);

Undefined Symbol playerid


Re: undefined playerid - Joe Staff - 02.02.2010

Mhm.... that's right.... 'playerid' isn't defined in that callback there.

But you know what is?.. 'i'... why not use 'i' instead of 'playerid'?


Also realize that TextDrawSetString updates all players' textdraws anyway, so you don't actually have to use TextDrawShowForPlayer.


Re: undefined playerid - hvampire - 02.02.2010

how to set it for all players?


Re: undefined playerid - SlashPT - 02.02.2010

Код:
for(new i = 0; i < MAX_PLAYERS; i++)