[AJUDA] srtok erro ! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] srtok erro ! (
/showthread.php?tid=328646)
[AJUDA] srtok erro ! -
gcoder - 25.03.2012
Код:
(1275) : error 017: undefined symbol "strtok"
C:\Users\Gabriel\Downloads\samp03dsvr_R2_win32\gamemodes\GM1.pwn(1275) : error 029: invalid expression, assumed zero
C:\Users\Gabriel\Downloads\samp03dsvr_R2_win32\gamemodes\GM1.pwn(1275) : error 029: invalid expression, assumed zero
C:\Users\Gabriel\Downloads\samp03dsvr_R2_win32\gamemodes\GM1.pwn(1275) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
Final do GM :
Код:
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: [AJUDA] srtok erro ! -
ViniBorn - 25.03.2012
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;
}