mIRC Home    About    Download    Register    News    Help

Print Thread
#14063 04/03/03 01:25 AM
Joined: Jan 2003
Posts: 6
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Jan 2003
Posts: 6
is there a way to make it so that a variable will only accept a numaric value?

its a on text command, so when i have people doing !command kdfkdfk it messes it up becuase i need it to only use and accpt numaric values

#14064 04/03/03 01:31 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Use the isnum operator.

Example:
Code:

On *:text:!command *:#:{
  if $2 isnum {
    do stuff
  }
  else {
    msg $nick We only accept numeric values.
  }
}

Read /help if-then-else for more info.

#14065 04/03/03 01:37 AM
Joined: Jan 2003
Posts: 6
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Jan 2003
Posts: 6
thanks, i thought there was a command like there, i must have just over looked it


Link Copied to Clipboard