Can You do more than 1 if and elseif? Not really much to my description but can you do that though?
Please attempt to actually try this yourself before asking here:
An if
statement is limited to one if
and one else
, but you can have any number of elseif
s:
if COND then --code elseif OTHERCOND then --code elseif THIRDCOND then --code else --code end --Else and elseif are not necessary: if COND then --code end if COND then --code else --code end if COND then --code elseif OTHERCOND then --code end
Example
local value1 = 0 if value1 == 1 then print("1") else if value1 == 0 then print("0") end end