Strange problem.
#1

Hi, I have a problem. Ever since I upgraded my gamemode to 0.3 I have been encountering alot of problems, the latest one is .. on some commands it sends the message "Server: Unknown Command" but the command still works, now I've checked the whole gamemode and remote handlers for something that could be causing this and I have found nothing, i just don't understand it.

Has anybody got any idea's as to what could be causing this?

I can't show any code because the script is private, so just idea's and thoughts please.
Reply
#2

does the command works but it's give you a "unknown command" too?
in that case, return 1;
Reply
#3

Quote:
Originally Posted by » Pawnst★r «
I can't show any code because the script is private, so just idea's and thoughts please.
How can it be so private that you can't even show the commands? xD

Anyways, yeah, make sure it returns 1.
Reply
#4

Make sure what returns 1? I have OnPlayerCommandText returning 0.
Reply
#5

OnPlayerCommandText returns 0 if the command does not exist in your script.
Since as you say its only some of them make sure there is return 1; at all of them
Reply
#6

Try adding return 0; at the last of the OnPlayerCommandText only but return 1; must be in eevry command .. Only one return 0; (at the last of OnPlayerCommandText)
Reply
#7

Quote:
Originally Posted by Desert
OnPlayerCommandText returns 0 if the command does not exist in your script.
Since as you say its only some of them make sure there is return 1; at all of them
On all of my commands? Ok .. I will check ... for the 4th time.

Also, I have return 0; in some of my commands ... an example of this:

pawn Код:
dcmd_clearallchat(playerid,params[]) {
  #pragma unused params
    if(PlayerInfo[playerid][Level] >= 3) {
        CMDMessageToAdmins(playerid,"CLEARALLCHAT");
        for(new i = 0; i < 50; i++) SendClientMessageToAll(green," "); return 1;
    } else return 0;
}
Is this correct? Like I say, it all worked perfectly in 0.2x but in 0.3 it is causing me alot of problems :/
Reply
#8

Ahh so its dcmd eh .... I am new to dcmd actually
Reply
#9

New to dcmd?! xD

Yeah, well ... any help is great.
Reply
#10

Ye i use strcmp cos it is easy for me xD .. But still try removing return 0 from each command and just let one be at the last
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)