Little Script, and error!
#1

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?
Reply
#2

pawn Код:
format(string, sizeof(string), "Kills: %d - Deaths: %d" , PlayerInfo[i][Kills], PlayerInfo[i][Deaths]);
Reply
#3

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?
Reply
#4

No no, you see the "i" is all 500 playerslots that you looped through.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)