/sms command not working.
#6

There's a few issues with your script.

pawn Код:
new gMessage[256];
        new Message[256];
These string don't need to be that big, the max displayable characters in SAMP are 128.

You also should add a return at this piece of code:
pawn Код:
if(!strlen(tmp))
        {
            SendClientMessage(playerid,COLOR_WHITE,"Usage: /sms [number] [message]");
        }
pawn Код:
if(!strlen(gMessage))
        {
            SendClientMessage(playerid,COLOR_WHITE,"Usage: /sms [number] [message]");
        }
So the script 'halts' at that line and doesn't continue.

You also don't return 1; on the bottom of the command.

I have no idea how to use strtok, so I won't comment on additional bugfixes, I myself prefer zcmd and sscanf as that's way easier to use and to-date.
Reply


Messages In This Thread
/sms command not working. - by Gytis0 - 16.06.2012, 22:52
Re: /sms command not working. - by mickos - 16.06.2012, 23:14
Re: /sms command not working. - by [NWA]Hannes - 16.06.2012, 23:17
Re: /sms command not working. - by Gytis0 - 16.06.2012, 23:53
Re: /sms command not working. - by Gytis0 - 19.06.2012, 16:46
Re: /sms command not working. - by Revo - 19.06.2012, 16:53
Re: /sms command not working. - by Gytis0 - 19.06.2012, 22:04
Re: /sms command not working. - by Gytis0 - 22.06.2012, 10:07
Re: /sms command not working. - by nilanjay - 22.06.2012, 10:13
Re: /sms command not working. - by Gytis0 - 27.06.2012, 17:59

Forum Jump:


Users browsing this thread: 2 Guest(s)