Xer0botXer0 Senpai Nov 7, 2016 #1 Hi guys, I haven't gotten around to using my beta key, I'd like to find out if gms 2.0 still only has 2D arrays ?
Hi guys, I haven't gotten around to using my beta key, I'd like to find out if gms 2.0 still only has 2D arrays ?
A Aura Guest Nov 7, 2016 #2 Yes, but now we have array literals. Code: var a = [1, 2, 3, 4, 5]; var b = []; ...and nested arrays. Code: var c = [1, 2, [3, [4, 5]], 6];
Yes, but now we have array literals. Code: var a = [1, 2, 3, 4, 5]; var b = []; ...and nested arrays. Code: var c = [1, 2, [3, [4, 5]], 6];
YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator Nov 7, 2016 #4 You could place arrays in other arrays for as long arrays became by-reference. In 1.x it was Code: var arr2; arr2[1] = 1; var arr1; arr1[2] = arr2; // arr1 = [ 0, 0, [0, 1] ] Once accessor chaining will be supported, all should be well.
You could place arrays in other arrays for as long arrays became by-reference. In 1.x it was Code: var arr2; arr2[1] = 1; var arr1; arr1[2] = arr2; // arr1 = [ 0, 0, [0, 1] ] Once accessor chaining will be supported, all should be well.
hdarren Member Nov 7, 2016 #5 Is there a reason why 3d arrays haven't been added yet? I would find them extremely useful.
Xer0botXer0 Senpai Nov 8, 2016 #6 So thats basically a three dimensional array where the third dimension is a nested two dimensional array ? I think ive done that in gms 1
So thats basically a three dimensional array where the third dimension is a nested two dimensional array ? I think ive done that in gms 1
hdarren Member Nov 10, 2016 #7 My problem is it is messy code. Code: global.var_RoomInformation[global.var_RoomInformation_SubArray[0,0],0]; Compared to clean code. Code: global.var_RoomInformation[0,0,0]
My problem is it is messy code. Code: global.var_RoomInformation[global.var_RoomInformation_SubArray[0,0],0]; Compared to clean code. Code: global.var_RoomInformation[0,0,0]