04.12.2009, 23:09
Thats the error(s) im getting
And strtok is on line 492
It strtok ment to be under a callback or something?
Here are the start of my commands
Any help would be appretiated
Код:
C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\cs.pwn(492) : error 017: undefined symbol "strtok" C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\cs.pwn(492) : error 029: invalid expression, assumed zero C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\cs.pwn(492) : error 029: invalid expression, assumed zero C:\Documents and Settings\Jack\Desktop\samp03asvr_R3_win32\gamemodes\cs.pwn(492) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
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;
}
Here are the start of my commands
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new tmp[256];
new string[256];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new giveplayerid, idx;
new specplayerid;
cmd = strtok(cmdtext, idx);

