some events work, some don't... WTF?

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

Moderator: MacroQuest Developers

OldNecro
a ghoul
a ghoul
Posts: 136
Joined: Thu Dec 19, 2002 3:09 am

some events work, some don't... WTF?

Post by OldNecro » Mon Feb 10, 2003 11:21 pm

Code: Select all

#event Dot1Broke "Exact cut and paste of wear-off message from logfile"
#event Dot2Broke "Exact cut and paste of wear-off message from logfile"
#event Dot3Broke "Exact cut and paste of wear-off message from logfile"
#event InvisBroke "Exact cut and paste of wear-off message from logfile"
#event BuffBroke "Exact cut and paste of wear-off message from logfile"

Sub Main
:MainLoop
   /somecrap
   /somecrap
   
   /doevents
/goto :MainLoop
/return
Only the invis event works. In fact, I put /echo's at the very top of the event subs to see if they were even being called. They aren't. Anyone have any thoughts on what could be causing this?

Grumpy
a hill giant
a hill giant
Posts: 167
Joined: Sun Nov 10, 2002 4:22 pm

Post by Grumpy » Tue Feb 11, 2003 7:26 am

I would guess, possibly because you've redirected things to chat boxes other than the main one, and MQ is not handling that gracefully? (yet)

OldNecro
a ghoul
a ghoul
Posts: 136
Joined: Thu Dec 19, 2002 3:09 am

Post by OldNecro » Tue Feb 11, 2003 10:12 am

nope. only sending tells to another window, and all this info is going to the same window as the invis breaking message

eq_freak
a ghoul
a ghoul
Posts: 105
Joined: Mon Jun 24, 2002 7:17 am

Post by eq_freak » Tue Feb 11, 2003 11:10 am

I had this exact same problem a while back when I was fiddling with my druidbot. I had events for all buff wear off messages, but one of them just would not trigger. I double and tripple checked that it was the correct wear-off text. Never did find out what was wrong.

OldNecro
a ghoul
a ghoul
Posts: 136
Joined: Thu Dec 19, 2002 3:09 am

Post by OldNecro » Tue Feb 11, 2003 11:46 am

here's the kicker... I have the EXACT SAME #event line and the event sub is identical in every way in another macro, and it works flawlessly!#@%$#%@

ARGH!!!

The main difference is that the new macro has like 16 events and the old one only had like 6 or 7... is it possible to have too many events? I doubt this tho because the invis event, which works fine, is the very last one listed... Pulling my hair out lol

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Tue Feb 11, 2003 12:58 pm

Salutations,
I know defines are read from the bottom up... or thats what plazoo told me... don't know if thats true anymore...

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Tue Feb 11, 2003 1:54 pm

It's because Plaz is dead, and all his magic is beginning to unravel :shock:

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Tue Feb 11, 2003 4:06 pm

Salutations,
There is no one behind the curtain dammit! just talk to the head...

insanitywiz
a hill giant
a hill giant
Posts: 250
Joined: Mon Jul 08, 2002 7:50 am

Post by insanitywiz » Tue Feb 11, 2003 4:43 pm

For some reason I want to know what chat includes you are using...don't ask me why.

OldNecro
a ghoul
a ghoul
Posts: 136
Joined: Thu Dec 19, 2002 3:09 am

Post by OldNecro » Tue Feb 11, 2003 10:29 pm

none... #chat exists nowhere in the code.

OldNecro
a ghoul
a ghoul
Posts: 136
Joined: Thu Dec 19, 2002 3:09 am

Post by OldNecro » Tue Feb 11, 2003 11:33 pm

AHA!!!

Each event will only execute once per run of the macro, whether it is called manually or triggered by the event itself. What could be causing that?

Malachi
a hill giant
a hill giant
Posts: 227
Joined: Tue Nov 19, 2002 1:29 am
Contact:

I'm assuming

Post by Malachi » Wed Feb 12, 2003 12:08 am

I'm assuming that you know you have to flush events after each run thru the code?...

err...I think you do?

/doevents flush?

I dunno. Lol, I'm all confused w/ events and alerts. Haha.

~malachi
~Oh danny boy, the pipes the pipes are calling.~

OldNecro
a ghoul
a ghoul
Posts: 136
Joined: Thu Dec 19, 2002 3:09 am

Post by OldNecro » Wed Feb 12, 2003 12:44 am

Yes I am doing that, but I believe the problem lies in the MQ code at this point... Considering the macro just totally shits the bed after it runs for a while now...

after properly executing the same line of code for more than 5 minutes, MQ just suddenly starts spewing "couldn't parse &&blah<15" even though it was able to parse it just fine for the last 10 thousand iterations or so...

eqjoe
a grimling bloodguard
a grimling bloodguard
Posts: 984
Joined: Sat Sep 28, 2002 12:26 pm

Post by eqjoe » Wed Feb 12, 2003 3:20 am

I solved a simular problem by using the trigered event to change a variable. Then I would call a routine that would take actions based on those variables. I found that my events where stomping all over each other because the action that I wanted to take as a result of an event was running when the next event triggered. My solution followed this logic:

Code: Select all

#event cast1 "Healme!"
#event cast2 "Healhim!"

:start
/doevents
/call do_stuff
/goto :start

sub Event_cast1
   /setvar heal1var "True"
/return

sub Event_cast2
  /setvar heal2var "True"
/return


sub do_stuff
  /if $heal1var=="True" {
  /call castheal
  /setvar heal1var 0
  }
  /if $heal2var=="True" {
  /call castotherheal
  /setvar heal2var 0
 }
/return

/return


When the do_stuff sub is called it handles all events that have fired.

User avatar
SingleServing
a hill giant
a hill giant
Posts: 195
Joined: Tue Dec 17, 2002 11:00 pm

If your going to do examples

Post by SingleServing » Wed Feb 12, 2003 7:02 am

you should at least add something to the code to set your var back to false after you done
[color=DarkBlue]Everything,[/color] [color=DarkBlue][b]is[/b][/color] [color=black]black[/color] [color=DarkBlue]and[/color] [color=white]white[/color][color=DarkBlue], when you zoom out it looks[/color] [color=gray]grey[/color][color=DarkBlue].[/color]