SA-MP Forums Archive
Compile Error [SOLVED] - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Compile Error [SOLVED] (/showthread.php?tid=125277)



Compile Error [SOLVED] - [WSM]Deadly_Evil - 03.02.2010

SOLVED!



Re: Compile Error - AKA_Cross - 03.02.2010

Add this to your GameMode

pawn Код:
stock strtok(const string[], &index,seperator=' ')
{
    new length = strlen(string);
    new offset = index;
    new result[MAX_STRING];
    while ((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }

    result[index - offset] = EOS;
    if ((index < length) && (string[index] == seperator))
    {
        index++;
    }
    return result;
}



Re: Compile Error - mansonh - 03.02.2010

He doesn't need to define it.
symbol is never used: "strtok"
means you never use it anywhere. You can ignore this error or delete strtok definition.


Re: Compile Error - Correlli - 03.02.2010

Never ignore the warnings.

Delete the function or add this:
pawn Код:
#pragma unused functionName
So it would be
pawn Код:
#pragma unused strtok
in your case but it's better if you delete it.


Re: Compile Error - [WSM]Deadly_Evil - 03.02.2010

Ok i have removed strtok