SA-MP Forums Archive
[Help] Indexed errors? o.O - 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: [Help] Indexed errors? o.O (/showthread.php?tid=172790)



[Help] Indexed errors? o.O - BlacK_PT - 31.08.2010

Ok my code is

Код:
if(PlayerInfo[Mute][playerid] == 1)
		{
		SendClientMessage(playerid, TEAM_CYAN_COLOR, "   You can't speak, you have been muted !");
		return 1;
	        }
if(PlayerInfo[PlayerCuffed][playerid] > 0)
		{
                SendClientMessage(playerid, COLOR_GREY, " You cannot do this while Cuffed !");
                return 1;
		}
GetPlayerName(playerid, sendername, sizeof(sendername));
GiveNameSpace(sendername);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
	{
	idx++;
	}
	new offset = idx;
	new result[128];
	while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
	{
	result[idx - offset] = cmdtext[idx];
	idx++;
	}
        result[idx - offset] = EOS;
	if(!strlen(result))
And the rest doesnt matter but the problem is:

Код:
error 033: array must be indexed (variable "Mute")
error 033: array must be indexed (variable "PlayerCuffed")



Re: [Help] Indexed errors? o.O - Grim_ - 31.08.2010

PlayerInfo[playerid][Mute] ?


Re: [Help] Indexed errors? o.O - BlacK_PT - 31.08.2010

i dont know... whats wrong?! o.O
Thats why I need help >.<


Re: [Help] Indexed errors? o.O - Norck - 31.08.2010

Quote:

PlayerInfo[playerid][Mute] ?

Quote:

i dont know... whats wrong?! o.O
Thats why I need help >.<

He means that maybe it should be
Код:
PlayerInfo[playerid][Mute]
PlayerInfo[playerid][PlayerCuffed]
instead of
Код:
PlayerInfo[Mute][playerid] 
PlayerInfo[PlayerCuffed][playerid]