SA-MP Forums Archive
error 033: array must be indexed (variable "cheaterr") - 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: error 033: array must be indexed (variable "cheaterr") (/showthread.php?tid=88880)



error 033: array must be indexed (variable "cheaterr") - Dj_maryo1993 - 29.07.2009

pawn Код:
new string[256];
new cheaterr[MAX_PLAYER_NAME];
cheaterr = GetPlayerName(playerid, cheaterr, sizeof(cheaterr));
SendClientMessage(playerid, 0x33CCFFAA, "cheats Detected ");
format(string, sizeof(string), "Warnning %s may use cheats , please check", cheaterr);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Kick(playerid);
Код:
D:\Multiple\Servere\Sa-mp\GF\gamemodes\gf.pwn(26922) : error 033: array must be indexed (variable "cheaterr")
Can someone help me please ?


Re: error 033: array must be indexed (variable "cheaterr") - Correlli - 29.07.2009

Change:
pawn Код:
cheaterr = GetPlayerName(playerid, cheaterr, sizeof(cheaterr));
to:
pawn Код:
GetPlayerName(playerid, cheaterr, sizeof(cheaterr));



Re: error 033: array must be indexed (variable "cheaterr") - Dj_maryo1993 - 29.07.2009

Thanx alot man , it works .