Little Script, and error! - 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: Little Script, and error! (
/showthread.php?tid=171301)
Little Script, and error! -
Nathaniel_Joness - 26.08.2010
Hello, i got this thing and it wont compile, it shows an error.
The Error:
error 017: undefined symbol "playerid"
On code:
public StatsInfromation()
{
new string[128];
(new i=0;i<MAX_PLAYERS;i++)
{
if (IsPlayerConnected(i))
{
format(string, sizeof(string), "Kills: %d - Deaths: %d" , PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths]);
TextDrawSetString(PlayerStats[i],string);
}
}
return 1;
}
how can i fix that?
Re: Little Script, and error! -
willsuckformoney - 26.08.2010
pawn Код:
format(string, sizeof(string), "Kills: %d - Deaths: %d" , PlayerInfo[i][Kills], PlayerInfo[i][Deaths]);
Re: Little Script, and error! -
Nathaniel_Joness - 26.08.2010
Quote:
Originally Posted by willsuckformoney
pawn Код:
format(string, sizeof(string), "Kills: %d - Deaths: %d" , PlayerInfo[i][Kills], PlayerInfo[i][Deaths]);
|
What?
if i add "new playerid;" should it work?
Re: Little Script, and error! -
Mystique - 26.08.2010
No no, you see the "i" is all 500 playerslots that you looped through.