SA-MP Forums Archive
error 021: symbol already defined: "strtok" & error 047: array sizes do not match, or destination array is too small - 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)
+--- Thread: error 021: symbol already defined: "strtok" & error 047: array sizes do not match, or destination array is too small (/showthread.php?tid=616635)



error 021: symbol already defined: "strtok" & error 047: array sizes do not match, or destination array is too small - Gorgeousmaniac - 08.09.2016

Guys I get these errors when compiling an RP gamemode which I got from the gamemodes section.
Код:
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(25115) : error 021: symbol already defined: "strtok"
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(25130) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(26655) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(26715) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(26768) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(27436) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(27495) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28176) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28204) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28215) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28275) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28544) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28571) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28601) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28609) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28643) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28651) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28684) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28729) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28792) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28850) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28858) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28893) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(28901) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(29128) : error 047: array sizes do not match, or destination array is too small
C:\Users\harvey\Desktop\Server test\gamemodes\larp.pwn(29182) : error 047: array sizes do not match, or destination array is too small

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
The parts with errors are here. http://pastebin.com/SXHFwKKU


Re: error 021: symbol already defined: "strtok" & error 047: array sizes do not match, or destination array is too small - bboytimix - 08.09.2016

i need line 25115
send me the code


Re: error 021: symbol already defined: "strtok" & error 047: array sizes do not match, or destination array is too small - Gorgeousmaniac - 08.09.2016

Quote:
Originally Posted by bboytimix
Посмотреть сообщение
i need line 25115
send me the code
Код:
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;
}



Re: error 021: symbol already defined: "strtok" & error 047: array sizes do not match, or destination array is too small - TORKQ - 08.09.2016

Код:
error 021: symbol already defined: "strtok"
You already have function/global variable/definition of strtok. Look up for it in code and post here.


Re: error 021: symbol already defined: "strtok" & error 047: array sizes do not match, or destination array is too small - Gorgeousmaniac - 08.09.2016

Quote:
Originally Posted by TORKQ
Посмотреть сообщение
Код:
error 021: symbol already defined: "strtok"
You already have function/global variable/definition of strtok. Look up for it in code and post here.
What do you mean? The script has 80k lines, the script name is Raven Roleplay.


Re: error 021: symbol already defined: "strtok" & error 047: array sizes do not match, or destination array is too small - Stinged - 08.09.2016

Delete that function, you already have it in your script.