mIRC Homepage
Posted By: littlecramp how do I indicate a negative number? - 16/01/03 01:07 PM
E.g
If (%posx isnum a~b) { command }

where a = -107, b=750


Posted By: Collective Re: how do I indicate a negative number? - 16/01/03 01:34 PM
No idea but
if ( %posx >= a ) && ( %posx <= b ) { command }
would work.
Posted By: Aubs Re: how do I indicate a negative number? - 16/01/03 02:39 PM
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?
Posted By: littlecramp Re: how do I indicate a negative number? - 17/01/03 07:12 AM
Thanks!
Posted By: Aubs Re: how do I indicate a negative number? - 17/01/03 09:18 AM
Pleasure wink
© mIRC Discussion Forums