Say your making a script and by the end of it you tell it to return a value. You don't know what kind of value it is but you hope it's a table. How would you go about confirming that the value is a table?
COMMUNITY QUESTION
How can you tell if a value is a table?
1 answer
By using the type function!
tab = {}
print(type(tab))
if type(tab) == "table" then
print("This will print!")
else
print("but this won't! D:")
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thanks... I completly forgot about the "type" function... :/