SA-MP Forums Archive
cmd = strtok(cmdtext, idx); problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: cmd = strtok(cmdtext, idx); problem (/showthread.php?tid=110138)



cmd = strtok(cmdtext, idx); problem - [HKS]dlegend - 24.11.2009

i updated to this now i have loads of error in my gm arrays size is to small how to fix please
and no im not useing sscanf
thanks
Код:
stock strtok(const stringdutils[], &index,seperator=' ')
{
	new length = strlen(stringdutils);
	new offset = index;
	new result[MAX_stringdutils];
	while ((index < length) && (stringdutils[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = stringdutils[index];
		index++;
	}

	result[index - offset] = EOS;
	if ((index < length) && (stringdutils[index] == seperator))
	{
		index++;
	}
	return result;
}



Re: cmd = strtok(cmdtext, idx); problem - Correlli - 24.11.2009

Search, this was answered many times.


Re: cmd = strtok(cmdtext, idx); problem - Kayaque - 24.11.2009

Thats probably why you have such many posts as well. Because you keep spamming this unuseful "seach" comments all over this forum.
If you dont help, you can shut it.
I dont know anything about scripting, so this is mainly just to prove my point to Don Correlli here.

Hope some SERIOUS member comes to help you out with your problem. Good luck.


Re: cmd = strtok(cmdtext, idx); problem - Correlli - 24.11.2009

Quote:
Originally Posted by Kayaque
If you dont help, you can shut it.
You can also shut it if you don't know the rules. And i'm 99.9% sure you don't so go and read them or do i need to quote them for you?


Re: cmd = strtok(cmdtext, idx); problem - [HKS]dlegend - 24.11.2009

the thing is i have search and carnt find an answer so please help


Re: cmd = strtok(cmdtext, idx); problem - mamorunl - 24.11.2009

http://forum.sa-mp.com/index.php?topic=132017.0