SA-MP Forums Archive
Help to rectify errors please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help to rectify errors please (/showthread.php?tid=295300)



Help to rectify errors please - [HHT]DRON - 05.11.2011

Help to rectify errors please
Код:
D:\Games\server\server\gamemodes\new11.pwn(2411) : error 017: undefined symbol "strtok"
D:\Games\server\server\gamemodes\new11.pwn(2411) : error 033: array must be indexed (variable "cmd")
D:\Games\server\server\gamemodes\new11.pwn(2456) : error 017: undefined symbol "strtok"
D:\Games\server\server\gamemodes\new11.pwn(2456) : error 033: array must be indexed (variable "tmp")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: Help to rectify errors please - [HHT]DRON - 05.11.2011

heeeeelp


Re: Help to rectify errors please - SmiT - 05.11.2011

For strtok error:
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;
}
https://sampwiki.blast.hk/wiki/Strtok

For anothers two, show the lines containing the errors.


Re: Help to rectify errors please - [HHT]DRON - 05.11.2011

thank you very much.