Three dimensional table in Lua
问题 I need the best way to store a three dimensional table for pixels. What I need to do is have multiple x,y tables (basically three dimensional) it is to raster multiple two dimensional pixel maps with transparency. You see I can create two dimensions easily like so: pixels = {{},{}} pixels[1][5] = "green" --just an example print(pixels[1][5]) However, I cannot do this like I can in Java... pixels = {{}, {}, {}} pixels[1][4][3] = "red" -- [x][y][z] print(pixels[1][4][3]) This is the