Multidimensional Array problem.
-
Maybe I'm just stupid tonight, or maybe I don't know how to use these in Fuze. This errors
Array myArray[6][26] myArray[0][6] = 1
Any index greater than 5 for 2nd dimension fails.
I suspect I am not doing this right because if Increase the amount of rows, the number of avail columns increases.
I get the error if the index of my 2nd dimension matches the len() of the first dimension.
Edit: I am doing this in the game tutorial from help. So the problem is not directly related to the 2d array
Unrecognized type: 4
-
Let's try this again. Here is the problem isolated.
array myArray[6][26] myArray[0][6] = 1 loop clear() print( Len( myArray) ) update() repeat // Result 7
Or
array myArray[6][26] myArray[0][25] = 1 loop clear() print( Len( myArray) ) update() repeat // Result 26
-
@_JKDOS len is bugged on multi dimensions. It returns the len of the wrong dimension. I'll edit this in a sec if there was as work around.
I believe you can specify the first dimension with
len(arrayname[0]) //Instead of doing len(arrayname[0][0]) //Until the bug is fixed
-
Sorry to double post. Not figured out how to end the code insert.
As for the other stuff. Might be another bug. Just been learning these myself and had troubles
-
I wasn't able to find a work around. If using Len() for something like for loops, I have to hard code the lengths in.