I am trying to write a program that is supposed to take boolean type values as arguments.
When all the statements relating to these boolean values were considered true regardless of the input, I discovered that they had been picked up as strings instead.
I then solved this by using this construct:
if arg[2] == "false" then local direction = false else local direction = true end
I know it's considered a strength that Lua automatically assigns types to variables but is there a way to force a certain type?
Maybe I am better of using a different input and comparing to the strings.
Thanks in advance












