natiny.script.make_bool

Lua
natiny.script.make_bool(value) -> boolean

Hands a boolean back, and errors on anything that is not one. The Lua twin of natiny_script_make_bool(), and a way of saying that a value is meant to be a boolean rather than merely truthy.

Parameters

Name Type Description
value boolean Must be true or false; a number or a string is an error

Returns

Type Description
boolean value

Example

Lua
natiny.script.set(mod, "game.debug", natiny.script.make_bool(debug_enabled))