mIRC Homepage

how to set for only number...

Posted By: HappyFappy

how to set for only number... - 07/11/14 02:33 AM

Code:
ON *:TEXT:*!calc*:#:{ 
  set %nulle $2 * 0.000025
  msg # Total: %nulle BTC!
}


That is what I have....

my question is how to set so that it see's $2 as a number, and if anything else, it just messages "use a number"

like:

!calc 1000
returns: Total: 0.025btc

and
!calc taco
returns: Please Use a Number
Posted By: Scakk

Re: how to set for only number... - 07/11/14 02:48 AM

Code:
ON *:TEXT:*!calc*:#:{ 
  if ($2 isnum) { 
    set %nulle $2 * 0.000025
    msg # Total: %nulle BTC!
  }
  else { msg # Please Use a Number }
}
Posted By: HappyFappy

Re: how to set for only number... - 07/11/14 02:49 AM

thank you
© 2022 mIRC Discussion Forums