Using too much CPU...Need help :(
#5

Use this version of strtok :
Код:
stock strtok(string[],&idx,seperator = ' ')
{
	new ret[128], i = 0, len = strlen(string);
	while(string[idx] == seperator && idx < len) idx++;
	while(string[idx] != seperator && idx < len)
	{
	  ret[i] = string[idx];
	  i++;
		idx++;
	}
	while(string[idx] == seperator && idx < len) idx++;
	return ret;
}
just change the new ret[128] to a lower if you want. I'd keep it like this, and replace your tmp[256] with tmp[128] and should compile well..

- X Cutter
Reply


Messages In This Thread
Using too much CPU...Need help :( - by Outbreak - 23.02.2009, 13:59
Re: Using too much CPU...Need help :( - by KnooL - 23.02.2009, 14:27
Re: Using too much CPU...Need help :( - by Nero_3D - 23.02.2009, 14:31
Re: Using too much CPU...Need help :( - by Outbreak - 23.02.2009, 14:53
Re: Using too much CPU...Need help :( - by x-cutter - 23.02.2009, 15:01
Re: Using too much CPU...Need help :( - by Outbreak - 23.02.2009, 15:41
Re: Using too much CPU...Need help :( - by Nero_3D - 23.02.2009, 16:20
Re: Using too much CPU...Need help :( - by Outbreak - 23.02.2009, 16:28
Re: Using too much CPU...Need help :( - by Joe Staff - 23.02.2009, 16:49
Re: Using too much CPU...Need help :( - by Outbreak - 23.02.2009, 17:50

Forum Jump:


Users browsing this thread: 1 Guest(s)