This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
grand_mind1's profile picture

Lua Question

Started by grand_mind1, 10 August 2013 - 01:31 AM
grand_mind1 #1
Posted 10 August 2013 - 03:31 AM
I just have a quick lua question. Is there anyway to check a variable's type? Like int, string, bool?
I've been trying to find a way to do this but haven't had any luck. Hopefully this is just quick and simple!
Help is appreciated!
Thanks! :D/>
jay5476 #2
Posted 10 August 2013 - 03:48 AM
you can just do a simple
 vType = type(var) -- using var as your variable 
grand_mind1 #3
Posted 10 August 2013 - 04:27 AM
Thanks!