Samp or scripting bug?
#1

When I type in game /std it shows me 'SERVER: Unknown command.' message, even though it should print 'Server: That command doesn't exist. For list of commands /commands.'

But, once I rename the command in the script as '/abc' it works fine.
I have also a command that does all same as /std( /selecttextdraw) and it works fine.
pawn Код:
if(!strcmp(cmdtext,"/std",true,4) && !cmdtext[4])
    {
        CancelSelectTextDraw(playerid);
        SelectTextDraw(playerid, COLOR_YELLOW);
        return 1;
    }
    if(!strcmp(cmdtext,"/selecttextdraw",true,15) && !cmdtext[15] )
    {
        CancelSelectTextDraw(playerid);
        SelectTextDraw(playerid, COLOR_YELLOW);
        return 1;
    }
    //...
    SendClientMessage(playerid,COLOR_GREEN2,"Server: That command doesn't exist. For list of commands /commands.");
    return 1;
Maybe usefull notes:
- this command worked fine for me before 3 weeks. Since then I didn't use it and now found it doesn't work.
- there is not any other command that starts with /std..
- there is no 'return 0' in OnCommandText
- when I putted printf("Hi"); inside /std it didn't show.
- if I type any other commands that doesn't exist it will show "Server: That command doesn't exist. For list of commands /commands.", but if I type /std it shows SERVER: Unknown command".
- Tried, not work:
pawn Код:
if( (!strcmp(cmdtext,"/selecttextdraw",true,15) && !cmdtext[15] ) || (!strcmp(cmdtext,"/std",true,4) && !cmdtext[4]) )
    {
        CancelSelectTextDraw(playerid);
        SelectTextDraw(playerid, COLOR_YELLOW);
        return 1;
    }
    //...
    SendClientMessage(playerid,COLOR_GREEN2,"Server: That command doesn't exist. For list of commands /commands.");
    return 1;
Reply


Messages In This Thread
Samp or scripting bug? - by Roko_foko - 25.07.2012, 13:21
Re: Samp or scripting bug? - by DeathOnaStick - 25.07.2012, 13:55
Re: Samp or scripting bug? - by TheDeath - 25.07.2012, 13:57
Re: Samp or scripting bug? - by Roko_foko - 25.07.2012, 13:59
Re: Samp or scripting bug? - by DeathOnaStick - 25.07.2012, 14:05
Re: Samp or scripting bug? - by Roko_foko - 25.07.2012, 14:10
Re: Samp or scripting bug? - by DeathOnaStick - 25.07.2012, 14:14

Forum Jump:


Users browsing this thread: 2 Guest(s)