What if they enter a number more than 2 digits? Only $right($+(00,%n),2) covers that eventuality. The first two don't handle that. Indeed, the second one will ADD a 0 to a number that's 3 digits or more already! None of them handle negative numbers correctly.
Code:

  if $regex(%n, /^[-]{0}([0-9]{2})$/) == 0 $&
    msg $nick You must use 02 digits for this function to work correctly.
  else $&
    /do.whatever
 
  ;  or, even simpler (but several more steps, therefore slower):
 
  if $len(%n) != 2 || %n !isnum 0-99 $&
    msg $nick You must use 02 digits for this function to work correctly.
  else $&
    /do.whatever


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C