error 017: undefined symbol "strtok"
#1

Код:
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1089) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1089) : error 033: array must be indexed (variable "cmd")
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1097) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1097) : error 033: array must be indexed (variable "tmp")
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1150) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1150) : error 033: array must be indexed (variable "tmp")
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1423) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1423) : error 033: array must be indexed (variable "tmp")
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1434) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1434) : error 033: array must be indexed (variable "tmp")
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1467) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1467) : error 033: array must be indexed (variable "tmp")
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1478) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1478) : error 033: array must be indexed (variable "tmp")
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1511) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1511) : error 033: array must be indexed (variable "tmp")
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1581) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1581) : error 033: array must be indexed (variable "tmp")
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1590) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1590) : error 033: array must be indexed (variable "tmp")
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1619) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1619) : error 033: array must be indexed (variable "tmp")
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1655) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1655) : error 033: array must be indexed (variable "tmp")
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1691) : error 017: undefined symbol "strtok"
C:\Users\Mijn pc\Desktop\samptest2\gamemodes\JuliensRoleplay2.pwn(1691) : error 033: array must be indexed (variable "tmp")

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


26 Errors.
Gamemode:

http://pastebin.com/ZnpNNnG5

Help please
Reply
#2

You Need to have the strtok function defined somewhere in your script, so anywhere in your script add this
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)