Converts the Lua value at the given index to a boolean value (false or true).
index
false
true
Lua Docs.
bool toBoolean(int index) => lua.lua.lua_toboolean(pointer, index) == 1;