Unknown command even if it's right - 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: Unknown command even if it's right (
/showthread.php?tid=260575)
Unknown command even if it's right - ColdIce - 09.06.2011
Hello, I am bored out of my mind so I started making alot of X-TREMELY useless commands!
if(strcmp(cmdtext, "/awesome", true) == 0)
{
SendClientMessage(playerid, COLOR_RED,"Yes You are Awesome!!!! xDxD");
}
It shows the respond, but beneath it, it says Unknown command blablabla
Why?
Re: Unknown command even if it's right -
*IsBack - 09.06.2011
place
at the end of every command.
Re: Unknown command even if it's right - ColdIce - 09.06.2011
ahh ofc thats what I did wrong. I did
if(strcmp(cmdtext, "/awesome", true) == 0)
{
SendClientMessage(playerid, COLOR_RED,"Yes You are Awesome!!!! xDxD");
}
return 1;
}
Re: Unknown command even if it's right -
Mike Garber - 09.06.2011
Quote:
Originally Posted by ColdIce
ahh ofc thats what I did wrong. I did
if(strcmp(cmdtext, "/awesome", true) == 0)
{
SendClientMessage(playerid, COLOR_RED,"Yes You are Awesome!!!! xDxD");
}
return 1;
}
|
Wrong.
pawn Код:
if(strcmp(cmdtext, "/awesome", true) == 0)
{
SendClientMessage(playerid, COLOR_RED,"Yes You are Awesome!!!! xDxD");
return 1;
}
NEVER do more } then you have { .
Think:
I open with {
I close with }