Boolean (class)

From Moondust Wiki
Revision as of 14:55, 15 March 2017 by Fun2 (talk | contribs) (Formating changes.)
Jump to navigation Jump to search

The Boolean data type is a has two values (usually denoted true (1) and false (0)). Variables can be set as boolean in Lua using the false and true parameters. When testing for boolean values in conditions, if var == true then or if var == false then is not needed, but rather only if var then when testing for true and if not var then when testing for false. You can learn more about boolean values here: http://lua-users.org/wiki/LuaTypesTutorial