Something else to check for: I don't know how you define your array since you didn't include that part of your pogram in the code above, but:
array:int[6,6]
will create an array that holds 6 cells to store information -- however, these will be addressed at 0,1,2,3,4,5... Note that these start at 0, and end at 5--- '6' itself does not exist.
Also, when you turn on Debug mode, does your program actually generate an error? e.g. "unhandled exception: attempt to index array element beyond array length"?
If you don't turn on debug, writing outside of the defined array will NOT result in an error, but it will end up writing in random memory locations -- which are not part of the array, and can change at any time, so trying to read back that non-existent slot can result in random different data being pulled if it changed in the mean time.
array:int[6,6]
will create an array that holds 6 cells to store information -- however, these will be addressed at 0,1,2,3,4,5... Note that these start at 0, and end at 5--- '6' itself does not exist.
Also, when you turn on Debug mode, does your program actually generate an error? e.g. "unhandled exception: attempt to index array element beyond array length"?
If you don't turn on debug, writing outside of the defined array will NOT result in an error, but it will end up writing in random memory locations -- which are not part of the array, and can change at any time, so trying to read back that non-existent slot can result in random different data being pulled if it changed in the mean time.