1
if (%var == 1 or 2 or 3 or 4 or 5) { }

So what u want is to check whether the variable's value is in between 1-5 in mirc?

I can do it like this:

if (%var == 1) {  }
if (%var == 2) {  }
if (%var == 3) {  }
if (%var == 4) {  }
if (%var == 5) {  }

But is there any shorter way?

Yochai Timmer
  • 48,127
  • 24
  • 147
  • 185
Sasuke Kun
  • 2,449
  • 3
  • 15
  • 14

1 Answers1

2

The idiomatic answer is:

if (%var isnum 1-5) {

}
Wiz
  • 2,145
  • 18
  • 15