SA-MP Forums Archive
Array size 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)
+--- Thread: Array size problem (/showthread.php?tid=489969)



Array size problem - TomsonTom - 24.01.2014

Hello,

I have a code that worked perfectly on previous versions of SA-MP.

Код:
new string[5000];
When I run this on 0.3z RC3 (didn't test previous RCs), the function runs up to the point where the array should be created and then the function returns. Server does not crash nor give me any warning.

Array sizes of 3800 or lower work perfectly.

Test:

Код:
public OnGameModeInit()
{
	// do stuff
	// ...
	
	print("array test");
	new string[5000];
	print("post array test");
	
	return 1;
}
The output in server log however is only:
Код:
array test
I guess there is something wrong with my configuration. It worked on 0.3x. Any ideas?

Thanks.


Re: Array size problem - TomsonTom - 24.01.2014

Raising the #pragma dynamic helped to solve the problem. (thanks Mmartin)