Erors - 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: Erors (
/showthread.php?tid=334247)
Erors -
3RoR - 14.04.2012
why this erors come ?
from here
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256], idx, tmp[256];
cmd = strtok(cmdtext, idx);
Код:
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(134) : error 017: undefined symbol "strtok"
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(134) : error 033: array must be indexed (variable "cmd")
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(320) : error 017: undefined symbol "strtok"
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(320) : error 033: array must be indexed (variable "tmp")
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(353) : error 017: undefined symbol "strtok"
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(353) : error 033: array must be indexed (variable "tmp")
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\firmu.pwn(133) : warning 203: symbol is never used: "idx"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.
Re: Erors -
Chris' - 14.04.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;
}
Put this in your gamemode
Re: Erors -
3RoR - 14.04.2012
THANKS <333 !, REP + !