The Gideros version of Lua has some extra operators not present in regular Lua.
Two of them are <> and >< (remember these are custom to Gideros Lua)
<> is used to compare two numbers and return the greater of them
>< is used to compare two numbers and return the lesser of them
You may not think so initially, but these are two really handy operators and can save your game both a lot of code and cpu time.
Instead of this:
if x<5 then x=5 end
You can put this:
Both of these routines will produce:
5 and so on...
To limit a number going up just use the other operator:
This will produce:
15 and so on...