sscanf2 problem
#4

add the STRTOK function to your script somewhere.

Код:
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;
}
I don't recommend using OnPlayerCommandText w/ strtok, however.
Reply


Messages In This Thread
sscanf2 problem - by alekschowee - 11.07.2016, 21:44
Re: sscanf2 problem - by Vince - 11.07.2016, 21:45
Re: sscanf2 problem - by alekschowee - 11.07.2016, 21:49
Re: sscanf2 problem - by TakeiT - 11.07.2016, 21:58

Forum Jump:


Users browsing this thread: 2 Guest(s)