Help with strtok
#1

Thats the error(s) im getting
Код:
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.
And strtok is on line 492
Код:
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;
}
It strtok ment to be under a callback or something?

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);
Any help would be appretiated
Reply


Messages In This Thread
Help with strtok - by xLowrider - 04.12.2009, 23:09
Re: Help with strtok - by aussie_winter - 04.12.2009, 23:12
Re: Help with strtok - by xLowrider - 04.12.2009, 23:15
Re: Help with strtok - by Abernethy - 04.12.2009, 23:27
Re: Help with strtok - by xLowrider - 04.12.2009, 23:49
Re: Help with strtok - by dice7 - 05.12.2009, 08:37

Forum Jump:


Users browsing this thread: 1 Guest(s)