Boolean to number in Lua
snippet in lua

Boolean to number in Lua

user1485

function bool_to_number(value)
  return value and 1 or 0
end