Quick actions

cmd+k|ctrl+k

Navigation

Languages

Lua calculator

Snippet info

Language

Lua

Visibility

public

Author

lunar.

Created

2022-03-20T05:40:38.087859Z

Updated

2022-03-20T05:40:38.087859Z

num1 =69
num2 =2

error = [[
    l1, sytanx error
    the value of num1 is a 'nil' value.
    ]]

 error2 = [[
     l1, sytanx error
     the value of num2 is a 'nil' value.
    ]]

    if num1 == 0 then
        print(error)
    elseif num2 == 0 then
        print(error2)
    else
        print(num1 + num2)
        --         ^ can change the operator to +, -, * , /
    if num1 == 69 then
        print("funny number")
    elseif num2 == 69 then
        print("funny number")
    
end
end
INFO