Skip to Content
API Referencebool_array (empty bool array)

bool_array (empty bool array)

bool_array() -> Array<Boolean>

Returns an empty array meant for booleans. Used as a helper function to allow shorthand logical operators & and | to be used with the resulting array.

Example:

local custom_array = {true, false} local proper_array = bool_array() proper_array[1] = false proper_array[2] = true local t = proper_array & {true, false} -- this is OK local t = custom_array & {true, false} -- this will produce an error local t = proper_array & custom_array -- this is OK again

See also num_array