mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 127
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Jan 2003
Posts: 127
E.g
If (%posx isnum a~b) { command }

where a = -107, b=750



Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
No idea but
if ( %posx >= a ) && ( %posx <= b ) { command }
would work.

Joined: Dec 2002
Posts: 143
A
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
This works fine...
just copy it and paste it into the status window:

//var %a = -100 | /var %b = 200 | /var %c = 300 | if (%c isnum %a - %b) { echo -a Yes! } | else { echo -a No! } | halt

or:
var %a = -100
var %b = 200
var %c = 300
if (%c isnum %a - %b) { echo -a Yes! }
else { echo -a No! }
halt

change the value of %c works fine for me!

you can set any of them to negative and it still works...

try setting the vars to:
%a = -100
%b = -300
%c = -50
returns "No!" (-50 is not between -100 and -300)
%a = -100
%b = -300
%c = -150
returns "Yes!" (-150 is between -100 and -300)

Help you?


Aubs.
cool

Joined: Jan 2003
Posts: 127
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Jan 2003
Posts: 127
Thanks!

Joined: Dec 2002
Posts: 143
A
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
Pleasure wink


Aubs.
cool


Link Copied to Clipboard