Error 33:Array Must be indexed
#1

I tried to create this if statement:

Код:
if (sscanf(params, "s[128]",status)) return SendClientMessage(playerid, 0xFFFFFFFF,"Correct Usage: /radio on/off");
	if (status == "on")
	{
	}
	else if (status == "off")
	{
	}
	else
	{
	SendClientMessage(playerid,0x828282FF,"Correct Usage: /radio on/off!");
	}
and i recieve :

Код:
\filterscripts\policev3.pwn(176) : error 033: array must be indexed (variable "status")
filterscripts\policev3.pwn(179) : error 033: array must be indexed (variable "status")
Reply
#2

You can't compare strings like that, this is not PHP. https://sampwiki.blast.hk/wiki/Strcmp
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)