Command added but returns Unkown command
#1

Hi

i added a command but for some reason it keeps saying it doesnt know the command
already tried doing return 1 everywhere, etc.

all other commands work fine. The position in the script doesnt bother
pawn Код:
if(!strcmp(cmdtext, "/join", true))
    {
        if(playercount >= 3)
        {

            dm[playerid] = 1;
           
        }
        else
        {
          dm[playerid] = 0;
          spectate(playerid);
        }
        return 1;
    }
edit: blag ignore the indentation
Reply
#2

Nothing wrong in that code, unless your dm array size is not at least the value of playerid (which is unlikely if you are alone in your server..), or some bugs in your spectate function maybe.
Reply
#3

shouldn't it be more like

if (strcmp("/join", cmdtext, true, 5) == 0)

Reply
#4

Quote:
Originally Posted by ExoSanty
shouldn't it be more like

if (strcmp("/join", cmdtext, true, 5) == 0)

You don't have to define the string size, it's optional. Sorry, this is all I have to contribute to this topic.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)