Problem with distance

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Post by EqMule » Tue Sep 23, 2003 1:48 am

all the versions mq ever have been are stored in cvs... you can check out any date you like...
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Tue Sep 23, 2003 2:08 am

how do I download an old version I can get a new one just dont know how to do an old one. Not good with the cvs thing

User avatar
ap50
a snow griffon
a snow griffon
Posts: 425
Joined: Sun Aug 18, 2002 2:29 pm

Post by ap50 » Tue Sep 23, 2003 3:36 am

Shouldn't
/if n $target(distance)>199 /goto :distance loop
be
/if n $target(distance)>199 /goto :distanceloop
[color=yellow][size=92][b]Just because you're paranoid, it doesn't mean everyone isn't out to get you![/b][/size][/color]

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Tue Sep 23, 2003 5:01 am

ok fixed that little bug but problem is still the same

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Tue Sep 23, 2003 12:52 pm

anyone wanna let me know how I download an older version of mq?

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Debug.

Post by grimjack » Tue Sep 23, 2003 1:09 pm

Have you tried puting in debug?
Example:

Code: Select all

:distanceloop
/if n $target(distance)>=200 {
   /echo Matched distance more than 199
   /echo Mob distance: $target(distance)
   /delay 1s
   /goto :distanceloop
}
/echo Did not match distance more than 199
/echo Mob distance: $target(distance)
Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Tue Sep 23, 2003 2:54 pm

well I put in an echo to show the $target(distance) and even it wouldnt even go into the loop so I know somehow the if statement isnt passing.

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Tue Sep 23, 2003 5:16 pm

Did you put one after the if too? You want one inside the if statement to see if the if is matching as true, and you want one after to see if it just matches false and continues. I just tested $target(distance) on my machine and it works fine.


Also without seeing all of your code there isn't really any good way to debug your code. The error could be anywhere else in the macro. It may not even be making it to that sub routine.

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

AarynD
a lesser mummy
a lesser mummy
Posts: 45
Joined: Thu Jan 02, 2003 11:25 am

Post by AarynD » Tue Sep 23, 2003 5:32 pm

Try reversing the logic of the comparison. Instead of

Code: Select all

/if n $target(distance)>=200 {
use

Code: Select all

/if n 200<$target(distance) {

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Tue Sep 23, 2003 5:50 pm

Ok I put it in and it is definetly a probelm with $target(distance) It appears that sometimes (not onlways...seems kinda random so far) That the $target(distance) value is about 1/2 of what it should be. Like my $target(distance)>100 is standing me up right when I am within casting range which is about 200. Could I just have compiled it wrong or what?

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Tue Sep 23, 2003 6:03 pm

Ok its actually showwing less then half most of the time. SOmetimes hoewever it does show the correct didtance. This sucks

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Wed Sep 24, 2003 12:33 am

Anyone got an ideas?

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Wed Sep 24, 2003 2:10 am

It's not broken -- it is your macro.

Distill the problem down to the smallest macro that fails and post it here. THere are so many errors in your previous macros, I don't know where to begin.

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Wed Sep 24, 2003 3:37 am

Well I sort of doubt it is my macro for 2 reason:

1.) The macro ran perfectly before I updated the version

2.) I can type /echo $target(distance) and it return bogus value like 50 when I am not even in casting distance. This is without using a macro.

Something strange is going on and it has nothing to do with my macro.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Wed Sep 24, 2003 12:22 pm

You are not standing over your target, are you?

Does this problem show up in PoK when targeting one of the bankers?