strtok
#1

I have an error with strtok:

Код:
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(28) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(28) : error 010: invalid function or declaration
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(922) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(937) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(27086) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(27146) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(27199) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(27249) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(27366) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(27595) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(27631) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(27713) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(27713) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(27713) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(27822) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(27831) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(28256) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(28315) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(28996) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(29024) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(29035) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(29095) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(29383) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(29410) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(29440) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(29448) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(29482) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(29490) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Callum Getty\Desktop\Roleplayu\gamemodes\audi.pwn(29523) : error 047: array sizes do not match, or destination array is too small

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
The strtok function:

pawn Код:
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
The pawn code line for each one is:
pawn Код:
cmd = strtok(cmdtext, idx);
Reply


Messages In This Thread
strtok - by iGetty - 21.05.2012, 20:01
Re: strtok - by Vince - 21.05.2012, 20:17
Re: strtok - by iGetty - 21.05.2012, 20:25
Re: strtok - by -CaRRoT - 21.05.2012, 20:48
Re: strtok - by iGetty - 21.05.2012, 20:50
Re: strtok - by 2KY - 21.05.2012, 21:00
Re: strtok - by iGetty - 21.05.2012, 21:03
Re: strtok - by 2KY - 21.05.2012, 21:05
Re: strtok - by iGetty - 21.05.2012, 21:09

Forum Jump:


Users browsing this thread: 3 Guest(s)