mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2014
Posts: 83
H
Babel fish
OP Offline
Babel fish
H
Joined: Sep 2014
Posts: 83
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

Joined: Oct 2009
Posts: 24
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2009
Posts: 24
Code:
ON *:TEXT:*!calc*:#:{ 
  if ($2 isnum) { 
    set %nulle $2 * 0.000025
    msg # Total: %nulle BTC!
  }
  else { msg # Please Use a Number }
}

Joined: Sep 2014
Posts: 83
H
Babel fish
OP Offline
Babel fish
H
Joined: Sep 2014
Posts: 83
thank you


Link Copied to Clipboard