Quote:
Originally Posted by BuuGhost
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.
|
Thank you, fixed a few of my problems. Do you know anyone who could try to fix my error? I found that there is a problem with the usage of the symbol "id". It's a variable that is always equal to 0. I found that out by testing the command with my friend; I was id 0, I successfully received a message from him, he was id 1 - he did not. While we relogged and re-tested it when he was id 0, the same happened, but we switched places; he received a message and he did not. So once again, can anyone help me? :/ I'm out of options here :/