for i,v in pairs(TakenNodes) do
print(unpack(v))
end
print(table.find(TakenNodes, {-40, -4, -36}))
Code ^
Output ^
Anyone know why it is returning nil?
for i,v in pairs(TakenNodes) do
print(unpack(v))
end
print(table.find(TakenNodes, {-40, -4, -36}))
Code ^
Output ^
Anyone know why it is returning nil?
It returns nil if it can’t find what you told it to look for in the table given. In this case, that would be {-40, -4, -36}
.
My point is that table included within the table, yet it is still returning nil.
You are comparing different tables with different memory addresses and content. Direct equality comparisons on tables don’t work as you would expect, here’s the simplest example I can think of:
print({} == {})
> false
You will have to compare each value in each table manually.