comparison not working.

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

RDPidb
a lesser mummy
a lesser mummy
Posts: 69
Joined: Mon Dec 15, 2003 1:14 am

comparison not working.

Post by RDPidb » Mon Feb 02, 2004 8:20 pm

Im tryign to move to a loc that is stored in an array.
When i get within 3 clicks of the LOC i want to stop.
So here is my code:
/sendkey down up
/if n $distance(@MobData(@NextMobToKill,2),@MobData(@NextMobToKill,3))<3
{
/echo Distance is: n $distance(@MobData(@NextMobToKill,2),@MobData(@NextMobToKill,3))
/sendkey up up
/goto :AtPullLocation
}

Problem is that no matter where I stand, I don't move and imidiatly jumps into the bracketed part, and I get output:
Distance is: 45 (or whatever the distance may be dependign on where im standing)
Then it jumps to :AtPullLocation liek its supposed to when im within 3 clciks, but not when im 45 clicks out :evil: .

Why is it jumping into the /if brackets when 45 is obviously !< 3
????

thanks
ryan

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Mon Feb 02, 2004 8:55 pm

You'd have to show more of your code to see whats going on.