I need a way of finding if a given table is two dimensional or just one dimensional. Is there a way to do this?
I’ve tried using the following code but it always ends in an error if the table is one dimensional:
if table[1][1] ~= nil then
print(“two dimensional”)
end
if #table[1] > 0 then
print(“two dimensional”)
end
Any ideas as to how to solve this?