bane_
Howardianism High-Priest
- Joined
- Nov 27, 2013
- Messages
- 1,559
I tried both
and
But when I try to get the value (if gUnitsVoidPoints[unit:GetOwner()][unit:GetID()] ~= nil then) I get:
What am I doing wrong?
Code:
gUnitsVoidPoints = {}
for i=1, 10 do
gUnitsVoidPoints[i] = {}
for j=1, 10 do
gUnitsVoidPoints[i][j] = 0
end
end
and
Code:
gUnitsVoidPoints = {}
for i=1, 10 do
gUnitsVoidPoints[i] = {}
for j=1, 10 do
gUnitsVoidPoints[i*10 + j] = 0
end
end
But when I try to get the value (if gUnitsVoidPoints[unit:GetOwner()][unit:GetID()] ~= nil then) I get:
UnitPanel.lua:718: attempt to index field '?' (a nil value)
What am I doing wrong?