intlimit <number>,<number>,<number>

Restricts the value of an numerical variable. If it exceeds the set max, it becomes reset to the set max; if it goes below the set min, it resets to the set min. In order, the numbers in the command are: numerical variable number, min value, max value.
    intlimit 0,10,20
    This sets %0 to a limit between 10 and 20.