Errors
#1

How can I fix these errors
Код:
C:\Users\Osman Ali\Desktop\Skin.pwn(92) : error 017: undefined symbol "strtok"
C:\Users\Osman Ali\Desktop\Skin.pwn(92) : error 033: array must be indexed (variable "cmd")
C:\Users\Osman Ali\Desktop\Skin.pwn(98) : error 017: undefined symbol "strtok"
C:\Users\Osman Ali\Desktop\Skin.pwn(98) : error 033: array must be indexed (variable "tmp")
C:\Users\Osman Ali\Desktop\Skin.pwn(91) : warning 203: symbol is never used: "idx"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
THis is the script.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128], idx;
    cmd = strtok(cmdtext, idx);
    if(strcmp("/clothes", cmdtext, true, 10) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid,40.0,207.4733,-109.8061,1005.1328))
        {
            new tmp[128];
            tmp = strtok(cmdtext, idx);
            if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /clothes [skinid]");
            if(strval(tmp) >= 0 && strval(tmp) <= 299) SetPlayerSkin(playerid, strval(tmp)); //Checks if valid skinid.  Also, make sure you restrict skins that aren't used, because if there is a skinid with no skin, player crashes.
        }
        else return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in range of whatever");
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
Errors - by Dare Devil..... - 27.07.2012, 09:50
Re: Errors - by Ironboy - 27.07.2012, 09:54
Re: Errors - by Dare Devil..... - 27.07.2012, 10:42
Respuesta: Errors - by farCry.xD - 27.07.2012, 11:27
Re: Errors - by Dare Devil..... - 27.07.2012, 12:11

Forum Jump:


Users browsing this thread: 1 Guest(s)