Lua - if elseif else statement

Published 2014/03/03 by Admin in LUA

The combination of if, elseif, and else now give us more than 2 options, we can have as many cases as are required.

c=3

if c==1 then

print("c is 1")

elseif c==2 then

print("c is 2")

else

print("c isn't 1 or 2, c is "..tostring(c))

end


my coding

This is a collection of all the coding gems I have found and would like to share with the world!