Unknown Commands - 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: Unknown Commands (
/showthread.php?tid=370761)
Unknown Commands -
SumX - 21.08.2012
Hello!
I have a problem with some commands.I use the commands,they are working good,but when I type them,i get Unknown Command,but I get the command text too.
For example ,a dialog.I type the command,it shows me the dialog,but in the chat I get Unknown command.
So...? I think is a 'return' problem? Can someone explain me when should I use return?
Thx!
Re: Unknown Commands -
Akira297 - 21.08.2012
Few examples of the commands? We need to see some coding here.
Re: Unknown Commands -
JaKe Elite - 21.08.2012
Did you return 1; on the command?
put return 1; before the bracket '}' on the command
Re: Unknown Commands -
SumX - 21.08.2012
Yeah,I ussually return 1; , some command I saw that dont have return 1; after the last bracket. These are the "Unknown Command" commands.I must put a return 1; after every command,no?
Re: Unknown Commands -
Ranama - 21.08.2012
WHat command processors are you using? if you are using ZCMD or somthing like that you'll have to return 1 on the player command text callback.
oterwise,
OnPLayerCommandText(playerid); will return a error message if you return your command to 0, (this will happen if the command processor don't find your command and will then return 0, if you don't want this error message when you have typed your command you should return 1 after all successfully done commands.
Hope it helped
Re: Unknown Commands -
kbalor - 21.08.2012
are you using sscanf??
Re: Unknown Commands -
MrBlake - 21.08.2012
Just put return 1 on all commands what get you "unknown command"