So I\'m having a bit of a strange problem with Lua, I use the following functions to setup, read and write from a global 3D "array" called Cube. However it seems t