Error 033 And Error 017 - 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: Error 033 And Error 017 (
/showthread.php?tid=260179)
Error 033 And Error 017 -
John_Cooper - 07.06.2011
C:\Documents and Settings\Administrator\My Documents\Custom TDM\gamemodes\WCSBS.pwn(671) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\My Documents\Custom TDM\gamemodes\WCSBS.pwn(671) : error 033: array must be indexed (variable "cmd")
Whats on this line
new cmd [128];
new idx;
cmd = strtok(cmdtext, idx);
Re: Error 033 And Error 017 -
DRIFT_HUNTER - 07.06.2011
add that on buttom of the script
pawn Код:
stock 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;
}
Re: Error 033 And Error 017 -
Steven82 - 07.06.2011
zcmd + sccanf = faster, easier, all around better.