PROBLEM|STRTOK - 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: PROBLEM|STRTOK (
/showthread.php?tid=214040)
PROBLEM|STRTOK -
tronix096 - 20.01.2011
I have a problem :/
Im compiled and have this error:
Код:
C:\Documents and Settings\Antonio\Desktop\SERVER\gamemodes\GM0.0.pwn(154) : warning 203: symbol is never used: "strtok"
I dont have a line 154 :S
Re: PROBLEM|STRTOK -
Alby Fire - 20.01.2011
Check if you created a "new strtok;" or something else, usually the strtok's stock doesn't do this error even if it's not used in the GameMode.
Re: PROBLEM|STRTOK -
WillyP - 20.01.2011
LRN2READ? It says: warning. That's not an
error. Use sscanf, and maybe your code isn't needing strtok.
Re: PROBLEM|STRTOK -
Jeffry - 20.01.2011
Add:
at TOP of your code. This will ignore the warning. It might be included in any of your include, thats why it shows Line 154. (Your script is 153 Lines long then).
Re: PROBLEM|STRTOK -
[USAK]Icey - 22.01.2011
i have 4 errors.please help
C:\Users\Thomas\Desktop\samp 0.3b server3\filterscripts\vipsytem.pwn(41) : error 017: undefined symbol "strtok"
C:\Users\Thomas\Desktop\samp 0.3b server3\filterscripts\vipsytem.pwn(41) : error 033: array must be indexed (variable "tmp")
C:\Users\Thomas\Desktop\samp 0.3b server3\filterscripts\vipsytem.pwn(5

: error 017: undefined symbol "strtok"
C:\Users\Thomas\Desktop\samp 0.3b server3\filterscripts\vipsytem.pwn(5

: error 033: array must be indexed (variable "tmp")
C:\Users\Thomas\Desktop\samp 0.3b server3\filterscripts\vipsytem.pwn(36) : warning 203: symbol is never used: "idx"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: PROBLEM|STRTOK -
blackwave - 22.01.2011
Quote:
Originally Posted by [USAK]Icey
i have 4 errors.please help
C:\Users\Thomas\Desktop\samp 0.3b server3\filterscripts\vipsytem.pwn(41) : error 017: undefined symbol "strtok"
C:\Users\Thomas\Desktop\samp 0.3b server3\filterscripts\vipsytem.pwn(41) : error 033: array must be indexed (variable "tmp")
C:\Users\Thomas\Desktop\samp 0.3b server3\filterscripts\vipsytem.pwn(5  : error 017: undefined symbol "strtok"
C:\Users\Thomas\Desktop\samp 0.3b server3\filterscripts\vipsytem.pwn(5  : error 033: array must be indexed (variable "tmp")
C:\Users\Thomas\Desktop\samp 0.3b server3\filterscripts\vipsytem.pwn(36) : warning 203: symbol is never used: "idx"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
|
@topic: I'd suggest as same as victi
You should
not put a question off-topic. Always, put that:
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;
}