4 error, Help please - 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: 4 error, Help please (
/showthread.php?tid=237473)
4 error, Help please -
buzifej - 09.03.2011
(616) : error 028: invalid subscript (not an array or too many subscripts): "Player"
(616) : error 001: expected token: ";", but found "]"
(616) : error 029: invalid expression, assumed zero
616) : fatal error 107: too many error messages on one line
The Error:
Код:
new string2[128];
if (floatround(GetPlayerSpeed(playerid)) > 1) {
// 616 line if (Player[playerid][Tickrate] < 25) {
format(string2, 128, "~w~~b~~h~~h~AFK: ~w~~r~NO~n~~w~~b~~h~~h~Ping: ~w~~y~~h~%d", Player[playerid][Tickrate], GetPlayerPing(playerid));
} else {
format(string2, 128, "~w~~b~~h~~h~AFK: ~w~~y~~h~NO~n~~w~~b~~h~~h~Ping: ~w~~y~~h~%d", Player[playerid][Tickrate], GetPlayerPing(playerid));
}
TextDrawSetString(fps_text[playerid], string2);
} else {
format(string2, 128, "~w~~b~~h~~h~AFK: ~w~~y~~h~YES~n~~w~~b~~h~~h~Ping: ~w~~y~~h~%d", GetPlayerPing(playerid));
TextDrawSetString(fps_text[playerid], string2);
}
Re: 4 error, Help please -
DJDhan - 09.03.2011
Make sure that you have your array name right. (Player)
Show you array declaration at the top of the script.