SA-MP Forums Archive
Multi dimensiona arrays initialise - 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: Multi dimensiona arrays initialise (/showthread.php?tid=350761)



Multi dimensiona arrays initialise - Reboma - 13.06.2012

Hi

I want to initialise a two dimensional array with -1 default values instead of 0.

In one dimensional its works perfectly:
new OneDimension[50] = { -1, ... };

But in two, its doesnt work:
new TwoDimension[50][2] = { {-1, -1}, ... };

Can you explain me, how can i use the onedimension style in the two dimensional?
Thank you