Server doesent recognize commands?
#1

I have LA-RP edit, and I changed a few things (Dont know what caused it).
And now my server says Unknown Command everytime I type something, where should I start looking for the problem
Reply
#2

OnPlayerCommandText
Reply
#3

I know this may sound stupid(I've done this before), I've been editing the wrong gamemode which didn't have the coding I'd been putting in. Make sure you're loading the correct .pwn file in the config file.
Reply
#4

'Unknown Server Command' returns if you have return 0; in a command;
pawn Код:
return 0;
To fix it; press CTRL+F and then type in the command. Go to the 'return 0;' and change it too 1.

Example of how return 0 and return 1 work:

pawn Код:
//(Using ZCMD)
//This command would return "Unknown Server Command" if used. The message would still send though; it would just send "Unknown Server Command" directly after it.
CMD:hithere(playerid, params[])
{
   SendClientMessage(playerid, -1, "Why hello!");
   return 0;
}
This command wouldn't send you "Unknown Server Command";
pawn Код:
CMD:hithere(playerid, params[])
{
   SendClientMessage(playerid, -1, "Why hello!");
   return 1;
}
But like someone said above; if it happens everytime you talk with the default chat; just CTRL+F, search OnPlayerText and change the return 0 to return 1.
Reply
#5

It happens on EVERY command...
Reply
#6

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
'Unknown Server Command' returns if you have return 0; in a command;
pawn Код:
return 0;
CMD:hithere(playerid, params[])
{
SendClientMessage(playerid, -1, "Why hello!");
return 0;
}
[/pawn]

This command wouldn't send you "Unknown Server Command";
pawn Код:
CMD:hithere(playerid, params[])
{
   SendClientMessage(playerid, -1, "Why hello!");
   return 1;
}
But like someone said above; if it happens everytime you talk with the default chat; just CTRL+F, search OnPlayerText and change the return 0 to return 1.
Look for what he said. return 0; and return 1; is different.
Reply
#7

Use only one command processor; for example, do not use ZCMD and dcmp together.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)