SA-MP Forums Archive
3-dimensional float - 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: 3-dimensional float (/showthread.php?tid=460928)



3-dimensional float - Baboon - 30.08.2013

Hey guys,

So I am kind of experimenting with something and I am trying to make a 3-dimensional float to work:

Код:
new Float:Spawnpoints[2][][4] =
{
	{//team 1
		{ 0.0, 0.0, 0.0, 0.0 },
		{ 0.0, 0.2, 0.3, 0.4 },
		{ 0.0, 0.2, 0.3, 0.4 }
	},
	{//team 2
	        { 0.0, 0.0, 0.0, 0.0 },
 		{ 0.0, 0.2, 0.3, 0.4 },
		{ 0.0, 0.2, 0.3, 0.4 }
 	}
};
Then I try to print one of the coords:

Код:
printf("%f", Spawnpoints[0][0][0]);
No errors or whatsoever with compiling, but when I start the server, it gives me these errors:

Код:
[17:23:24] [debug] Run time error 22: "AMX not initialized (or doubly initialized)"
[17:23:24] [debug] Run time error 22: "AMX not initialized (or doubly initialized)"
[17:23:24] Script[gamemodes/basetdm.amx]: Run time error 22: "AMX not initialized (or doubly initialized)"
What's wrong here? It only happens when I put the printf there.


EDIT: Got it fixed by doing [2][3][4] or [][][4], seems you can't do something like [2][][4]...