What is wrong with this command
#1

Hello, I got a problem in my /pm command.

This is a half bit of it.

pawn Код:
cmd = strtok(cmdtext, idx);
    if(strcmp(cmd, "/pm", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GREEN, "/pm [id] [text]");
                return 1;
            }
This is the errors i get:
Line 27:
Код:
error 047: array sizes do not match, or destination array is too small
Line 32:
Код:
error 047: array sizes do not match, or destination array is too small
This is line 27:

Код:
cmd = strtok(cmdtext, idx);
And this is line 32:
Код:
tmp = strtok(cmdtext, idx);
Anyone know how to fix this?

Thanks, Alex
Reply
#2

do you have
new cmd[256] and new tmp[256]?
Reply
#3

lol that was the problem :P Anyways thanks.
Reply
#4

Np...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)