local String = "Test String" local Table = {1,2,3,4,5}
How would I determine which variable stores what kind of data? Does that question make sense, or do I need to clarify?
Use the type()
method! So basically,
local String = "Test String" local Table = {1,2,3,4,5} print(type(String)) --> "string" print(type(Table)) -->"table"
It returns a string of the name of your variable's data type. So when comparing:
if type(String) == "string" then -- right if type(String) == string then --wrong!