Racing Stats Help
#1

Код:
	if(strcmp(cmd,"/racingstats",true)==0) // disabeled
  {
    if(IsPlayerConnected(playerid))
	  {
			new totalr = PlayerInfo[pRaceTotal];
			new racew = PlayerInfo[pRaceWins];
			new racel = PlayerInfo[pRaceLosses];
	    SendClientMessage(playerid, COLOR_WHITE, "|__________________ TEXT__________________|");
	    format(string, sizeof(string), "** Races Total: [%d]", totalr);
			SendClientMessage(playerid, COLOR_WHITE, string);
			format(string, sizeof(string), "** Races Wins: [%d]", racew);
			SendClientMessage(playerid, COLOR_WHITE, string);
			format(string, sizeof(string), "** Race Losses: [%d]", racel);
			SendClientMessage(playerid, COLOR_WHITE, string);
			SendClientMessage(playerid, COLOR_WHITE, "|______________________________________________|");
		}
	  return 1;
 	}
i get this errors
error 033: array must be indexed (variable "-unknown-")
error 033: array must be indexed (variable "-unknown-")
error 033: array must be indexed (variable "-unknown-")


Any one has an idea ?
Reply
#2

Try
Код:
new totalr = PlayerInfo[playerid][pRaceTotal];
new racew = PlayerInfo[playerid][pRaceWins];
new racel = PlayerInfo[playerid][pRaceLosses];
Instead of
Код:
new totalr = PlayerInfo[pRaceTotal];
new racew = PlayerInfo[pRaceWins];
new racel = PlayerInfo[pRaceLosses];
Reply
#3

Works

Problem Fixed Thanks to Sinyavski
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)