Posted 08 September 2013 - 11:57 PM
i been having a problem with my array it seems that when i try to print or modify it, i get a
index expected, got nil error:
I checked the spelling of everything and even tried it in luaEclipes. it works perfectly in luaEclipes i should add, but not in CC.
here is my array setup:
but when i try to acces/modify the array using the integer aXl for aX, aYl for aY, and aZl for aZ i get errors that i dont get in luaEclipes
is there anyway around this problem or am i dead in the water sorta speak…
index expected, got nil error:
I checked the spelling of everything and even tried it in luaEclipes. it works perfectly in luaEclipes i should add, but not in CC.
here is my array setup:
array = {}
for aX = 1, 48 do
array[aX] = {}
for aY = 1, 48 do
array[aX][aY] = {}
for aZ = 1, 100 do
array[aX][aY][aZ] = 20
end
end
end
all i changed was the array name for this examplebut when i try to acces/modify the array using the integer aXl for aX, aYl for aY, and aZl for aZ i get errors that i dont get in luaEclipes
aXl = 1
aYl = 2
aZl = 3
array[aXl][aYl][aZl] = 15
when i print
print(array[1][2][3])
it works fine. the problem seemes to be accesing the array with another integer.is there anyway around this problem or am i dead in the water sorta speak…