From Minetest Developer Wiki
Revision as of 02:02, 15 June 2018 by ANAND (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Mbox warning.png This page has been proposed for deletion for the following reason: " Deprecated in favour of minetest.Settings"
If you don't think that this page should be deleted, please explain why on the talk page.




Returns either the boolean that is stored in minetest.conf under <source enclose="none">name</source>, or <source enclose="none">nil</source> if the variable is not found.

This function reads a string. If the string equals any of y, yes, true, or 1, then it is considered true; else, it is considered false.


<source> local dmg = minetest.setting_getbool("enable_damage") if (dmg == nil) then

   -- Set up a suitable default value
   dmg = true

end if (dmg) then

   player:sethp(player:gethp() - 1)

end </source>

See Also