SA-MP Forums Archive
Help Me! Two Lame Error's!!! - 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: Help Me! Two Lame Error's!!! (/showthread.php?tid=162946)



[SOLVED] Help Me! Two Lame Error's!!! - soulas85 - 25.07.2010

Error's:
Код:
C:\Users\Slashas94\Desktop\Sona GM\gamemodes\Sona.pwn(1361) : error 021: symbol already defined: "strtok"
C:\Users\Slashas94\Desktop\Sona GM\gamemodes\Sona.pwn(1376) : error 047: array sizes do not match, or destination array is too small
Line's:
Код:
public OnPlayerExitedMenu(playerid)
{
	return 1;
}

stock 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;
}
Please help me, i can't fix it!


Re: Help Me! Two Lame Error's!!! - bartje01 - 25.07.2010

try to put the stock under ongamemodeinit. Not in but below it.


Re: Help Me! Two Lame Error's!!! - soulas85 - 25.07.2010

where do you see such a line with ONGAMEMODEINIT? i've tried to delete it but PAWNO crashes!


Re: Help Me! Two Lame Error's!!! - dice7 - 25.07.2010

Delete it away


Re: Help Me! Two Lame Error's!!! - soulas85 - 25.07.2010

i've tried, but if i delete it PAWN crashes


Re: Help Me! Two Lame Error's!!! - bartje01 - 25.07.2010

can you send me your script in PM?
With pastebin


Re: Help Me! Two Lame Error's!!! - soulas85 - 25.07.2010

come on! can someone help me?


Re: Help Me! Two Lame Error's!!! - Shadow™ - 25.07.2010

Can you paste your #includes please? Thanks...

Also, I want them because if you have the latest 0.7 includes, a_samp includes utils which already has strtok defined so you don't need it in your script.

Secondly, with the ExitedMenu, I can't see anything wrong so if you're not using it, delete it ^.^


Re: Help Me! Two Lame Error's!!! - soulas85 - 25.07.2010

I Can't Delete STRTOCK! I SAID PAWN CRASHES IF I DELETE IT


Try - bartje01 - 25.07.2010

I pmed you the goo done