ChardScript If...Else
Last updated
call a = 33
call b = 200
if b > a then
echo("b is greater than a")call a = 33
call b = 33
if b > a then
echo("b is greater than a")
elseif a == b then
echo("a and b are equal")
endcall a = 200
call b = 33
if b > a then
echo("b is greater than a")
elseif a == b then
echo("a and b are equal")
else
echo("a is greater than b")
endcall a = 200
call b = 33
if b > a then
echo("b is greater than a")
else
echo("b is not greater than a")
endif a > b then echo("a is greater than b")if a > b then echo("A") else echo("B")call a = 200
call b = 33
call c = 500
if a > b and c > a then
echo("Both conditions are True")
endcall a = 200
call b = 33
call c = 500
if a > b or a > c then
echo("At least one of the conditions is True")
endcall x = 41
if x > 10 then
print("Above ten,")
if x > 20 then
print("and also above 20!")
else
print("but not above 20.")
end
end