Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

lua how to default value if nil or false

local function foo(x, y, z)
    local x = x or true
    local y = y or 1234
    z = z or "default"
end
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #lua #default #nil #false
ADD COMMENT
Topic
Name
5+8 =