Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a way to check if a variable is a certain type of data?

Asked by 5 years ago

For example:

local var = {}

is there a way to check if the variable above is a table or a string and more?

1 answer

Log in to vote
2
Answered by 5 years ago

use type()

local var = {}
print(type(var))

this will print table

Ad

Answer this question