Unknown Commands
#1

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!
Reply
#2

Few examples of the commands? We need to see some coding here.
Reply
#3

Did you return 1; on the command?
put return 1; before the bracket '}' on the command
Reply
#4

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?
Reply
#5

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
Reply
#6

are you using sscanf??
Reply
#7

Just put return 1 on all commands what get you "unknown command"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)