My attempts to build a function that returns a boolean value have failed.
This fails with an error on the line that includes the return statement.
If I quote "true" and "false" the function works but I get a string value and not a boolean value back.Code:function isCheese( food ) if food == "cheese" then return true; else return false; end end
Lua defines true and false as keywords. Am I doing something wrong or does Lua just not support returning booleans?
thanks,
Terry




Reply With Quote