In my game I want to keep my 2d arrays externally (there are a lot of them and they are huge)
I am trying this:
in main.lua:
dofile("arrays.lua") ... array\_1[currentRow][x] ERROR: attempt to index global 'array\_1' (a nil value)
in arrays.lua:
array\_1 = {{0,0,1.0,0}, {0,2,0,1,0}, {0,0,0,1,0}, {0,0,0,1,0}, {0,2,0,1,0}, {0,0,0,1,0}, {0,0,0,1,0}, {2,0,0,1,0}, {0,0,0,1,0}, {1,1,0,0,0}}
When I put array_1 into main.lua everything works as expected. What am I doing wrong?