[DCMD] Problem
#1

Hi. I want to do a command with several parameters. For example, someone typed "/p show" that displays something, someone enters "/p delete" displays something else. I have such a code is:
Код:
dcmd_p(playerid, cmdtext[])
{
	new tag[64];
	if(sscanf(cmdtext, "u", tag))
	{
	  SendClientMessage(playerid, WHITE, "Usage /p (show,delete)");
	  
	}
	else
	{
	  if(tag == "show")
	  {
	  	SendClientMessage(playerid,WHITE,"adsadada:");
		}
		
	}
	return 1;
}
Error:
Quote:

error 033: array must be indexed (variable "tag")

Reply


Messages In This Thread
[DCMD] Problem - by ErF - 25.02.2010, 11:38
Re: [DCMD] Problem - by SloProKiller - 25.02.2010, 11:44
Re: [DCMD] Problem - by ErF - 25.02.2010, 11:46
Re: [DCMD] Problem - by dice7 - 25.02.2010, 11:48
Re: [DCMD] Problem - by ErF - 25.02.2010, 11:51
Re: [DCMD] Problem - by Niixie - 25.02.2010, 12:50
Re: [DCMD] Problem - by ErF - 25.02.2010, 13:01

Forum Jump:


Users browsing this thread: 3 Guest(s)