SA-MP Forums Archive
Racing Stats Help - 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: Racing Stats Help (/showthread.php?tid=119306)



Racing Stats Help - ArTisT - 07.01.2010

Код:
	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 ?



Re: Racing Stats Help - Norck - 07.01.2010

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];



Re: Racing Stats Help - ArTisT - 07.01.2010

Works

Problem Fixed Thanks to Sinyavski