SA-MP Forums Archive
Command results in unkown. - 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)
+--- Thread: Command results in unkown. (/showthread.php?tid=463145)



Command results in unkown. - devil shill - 10.09.2013

Hey Guys,

Got a problem with this command when you type it int it will show the SendClientMessage but if you
put in any number (case number) behind it it will result in unkown command.

Код:
	if(strcmp(cmdtext, "/floor", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (IsPlayerInRangeOfPoint(playerid, 5,192.1159,1987.5228,18.6325) || IsPlayerInRangeOfPoint(playerid, 5,191.6678,1986.7853,39.4619) || IsPlayerInRangeOfPoint(playerid, 5,192.1159,1987.5228,65.7506))
            {
	            if(gPlayerLogged[playerid] == 0)
	            {
	                SendClientMessage(playerid, COLOR_GREY, "You are not logged in ...!");
	                return 1;
	            }
	            if(gPlayerLogged[playerid] == 1)
				tmp = strtok(cmdtext, idx);
		        if(!strlen(tmp))
		        {
      				SendClientMessage(playerid, COLOR_GRAD1, "{33CCFF}USAGE:{FFFFFF} /floor [floor]");
					SendClientMessage(playerid, COLOR_GRAD4, "[0] Floor 0 [1] Administration [2] Control Tower");
		            return 1;
		        }
				new stat;
				stat = strval(tmp);
				switch(stat)
				{
				    case 0:
				    {
                        MoveDynamicObject(lifta,194.85271, 1987.01111, 17.31270, 1.5);
                        MoveDynamicObject(liftb,194.86310, 1985.38354, 19.03950, 1.5);
                        MoveDynamicObject(liftc,196.50270, 1987.07373, 19.03950, 1.5);
                        MoveDynamicObject(liftd,194.86310, 1988.77368, 19.03950, 1.5);
                        MoveDynamicObject(lifte,194.85271, 1987.01111, 20.69870, 1.5);
                        SendClientMessage(playerid, COLOR_GRAD4, "Lift is heading to floor 0 please wait!");
					}
				    case 1:
				    {
                        MoveDynamicObject(lifta,194.85271, 1987.01111, 38.31040, 1.5);
                        MoveDynamicObject(liftb,194.86310, 1985.38354, 40.06420, 1.5);
                        MoveDynamicObject(liftc,196.50270, 1987.07373, 40.06910, 1.5);
                        MoveDynamicObject(liftd,194.86310, 1988.77368, 40.07010, 1.5);
                        MoveDynamicObject(lifte,194.85271, 1987.01111, 41.73050, 1.5);
                        SendClientMessage(playerid, COLOR_GRAD4, "Lift is heading to Adminstration floor please wait!");
					}
	    			case 2:
				    {
                        MoveDynamicObject(lifta,194.85271, 1987.01111, 64.54390, 1.5);
                        MoveDynamicObject(liftb,194.86310, 1985.38354, 66.30040, 1.5);
                        MoveDynamicObject(liftc,196.50270, 1987.07373, 66.30250, 1.5);
                        MoveDynamicObject(liftd,194.86310, 1988.77368, 66.30330, 1.5);
                        MoveDynamicObject(lifte,194.85271, 1987.01111, 67.96620, 1.5);
                        SendClientMessage(playerid, COLOR_GRAD4, "Lift is heading to Control Tower floor please wait!");
					}
				}
			}
			else
			{
			    SendClientMessage(playerid,COLOR_RED,"You are not inside the Control Tower at the DoC!");
			    return 1;
			}
		}
		return 1;
	}
Note that there is not any error given within Pawno !


Re: Command results in unkown. - devil shill - 10.09.2013

Ive tried the crashdetect plugin but it gave no result in matter of fact it just said OK so,


Re: Command results in unkown. - Jefff - 10.09.2013

Here is an error

pawn Код:
if(strcmp(cmdtext, "/floor", true) == 0)
and think why