Variable
#1

Hello, I want make IF. That if is 0, wrote one text, if is more than 0 wrote next text. And my code:
Код:
CMD:t1(playerid,params[])
{
	masinike[playerid]=400;
	new string[6]="v";
 	strcat(string,masinike[playerid]);
  	if(string==0)
   	{
   	    SendClientMessage(playerid,RAUDONA,"No units.");
    }
    else
    {
		new msg[15];
		format(msg,sizeof(msg),"Is units: %d",string);
		SendClientMessage(playerid,RAUDONA,msg);
    }
	return 1;
}
Error:
Код:
error 033: array must be indexed (variable "string")
Reply


Messages In This Thread
Variable - by deimantas1 - 23.07.2013, 14:35
Re: Variable - by Sinner - 23.07.2013, 14:41
Re: Variable - by Aliassassin123456 - 23.07.2013, 14:44
Re: Variable - by deimantas1 - 23.07.2013, 15:08
Re: Variable - by MP2 - 23.07.2013, 15:09
Re: Variable - by deimantas1 - 23.07.2013, 15:12

Forum Jump:


Users browsing this thread: 1 Guest(s)