Marwa kamal
0
Q:

lua if else

    if op == "+" then
      r = a + b
    elseif op == "-" then
      r = a - b
    elseif op == "*" then
      r = a*b
    elseif op == "/" then
      r = a/b
    else
      error("invalid operation")
    end
1
if bool then
	--code
else
	--code
end
2

New to Communities?

Join the community