Has anyone had any experience with multi-dimensional arrays in LUA? For example:
Code: Select all
A = {{},{}} -- Defines a two-dimensional array A.
A[1][1] = 3, A[1][2] = 5; A[1][3] = A[1][1] - A[1][2]; A[1][4] = "25"
A[2][1] = 5, A[2][2] = 6; A[2][3] = A[2][1] - A[2][2]; A[2][4] = "45"
-- All of the above works fine.
A[3][1] = 9, A[3][2] = 2; A[3][3] = A[3][1] - A[3][2]; A[3][4] = "45"
-- As soon as I get above A[2][n], I get an error.
Any help would be most appreciated.
Sparky