SA-MP Forums Archive
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: Array sizes do not match, or destination array is too small (/showthread.php?tid=605134)



Array sizes do not match, or destination array is too small - andrejc999 - 14.04.2016

So guys, I'm making a vehicle system and I'm using dini.. I know it's old but i like it for some reason... So does anyone know what's the problem, I'm tryin' to load name from .ini...

Код:
enum vInfoo
{
	vOwner[MAX_PLAYER_NAME],
	vPrice,
	vLocked,
	vModel,
	vX,
	vY,
	vZ,
	vRotation,
	vColor1,
	vColor2,
	vEngine
};
new vehInfo[MAX_VEHICLES][vInfoo];



vehInfo[x][vOwner] = dini_Get(file, "Owner");



Re: Array sizes do not match, or destination array is too small - J0sh... - 14.04.2016

PHP код:
format(vehInfo[x][vOwner], MAX_PLAYER_NAME"%s"dini_Get(file"Owner")); 
It should work like this, not too sure though.


Re: Array sizes do not match, or destination array is too small - andrejc999 - 14.04.2016

Omg.. Thank you so much man i've been tryin' to fix this for like 2 hours... Thx!


Re: Array sizes do not match, or destination array is too small - introzen - 15.04.2016

You can never set a string using the = sign in PAWN. It must be formatted.


Re: Array sizes do not match, or destination array is too small - andrejc999 - 15.04.2016

Ye i didn't know that thx!