How do I made something say if x is greater then n then perform y.
e.g.
[lua]
if x < n then
y()
else
print("Error.")
end
[/lua]
So in words.
[lua]
if [x] {is greater then} [n] {do y}
[/lua]
[lua]if (x > y) then
blah
else
blah
end[/lua]
I don't get what you don't understand?
I didn't know if you would do == signs then a < sign.
Signs:
[code]= ( Used for Defining Variables )
> ( Greater Than )
< ( Less Than )
== ( Equal To )
=> ( Equal To or Greater Than )
=< ( Equal To or Less Than )[/code]
Example code
[lua]if x > y then
Msg("X is Greater than Y! OMG!")
else
Msg("OMG X is NOT Greater than Y! this is racism")
end[/lua]
Sorry, you need to Log In to post a reply to this thread.