strtok problem
#1

hey i get

*\Properties.pwn(355) : error 017: undefined symbol "strtok"

when compiling

i know i need to add the function but i dont have it :/
Reply
#2

https://sampwiki.blast.hk/wiki/Strtok
Reply
#3

Thanks man, and sorry that i forgot to check wiki.samp :P
Reply
#4

Easy one
Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)