Basic Healing
I was hoping someone could help with this basic macro, I have been reading a lot but I'm getting the below error. If I run the macro when my tank is attacking it heals one then gives the error. I put my char name in place of MAINTANK before loading testing.
Flow ran into another subroutine
clericheal.mac@19(Heal):Sub Heal
Macro
Mon Jun 10, 2013 11:22 pm
Your sub Main does not have a
/return
also it is not really an infinite loop which is what you want these things to be in general.
finally your general flow here is not how I would heal. timers are bad for casting. You want if conditions to trigger things for more control.
I changed the loop and added a /return see if this works better.
_________________
Sorvani
/return
also it is not really an infinite loop which is what you want these things to be in general.
finally your general flow here is not how I would heal. timers are bad for casting. You want if conditions to trigger things for more control.
I changed the loop and added a /return see if this works better.
Macro
_________________
Sorvani
Tue Jun 11, 2013 1:41 am
Senior Project Member
Thanks Sorvani, I will be able to test this later.
My intent with the timers was to use clicky items to heal if they are available. I thought the timers were needed to keep track of the cast time and the recast time, /call cast "Hammer of the High Priest" item 3s (cast time)
/varset clericdv1 10s (recast timer)
/if the timer isn't at 0 to show the item is ready the program will move on to the next heal, ${clericdv1} == 0)
Is there a better way to tell if a clicky item is ready to cast? Or am I misunderstanding your comment "You want if conditions to trigger things for more control".
Thanks
My intent with the timers was to use clicky items to heal if they are available. I thought the timers were needed to keep track of the cast time and the recast time, /call cast "Hammer of the High Priest" item 3s (cast time)
/varset clericdv1 10s (recast timer)
/if the timer isn't at 0 to show the item is ready the program will move on to the next heal, ${clericdv1} == 0)
Is there a better way to tell if a clicky item is ready to cast? Or am I misunderstanding your comment "You want if conditions to trigger things for more control".
Thanks
Tue Jun 11, 2013 1:33 pm
The code you provided doesn't work so I went down to a lower level to troubleshoot and I can't get the below routine to loop, the below code runs once and ends. I'm running UF with the UF download if that helps.
Macro
Tue Jun 11, 2013 11:13 pm
When the macro runs once and stops...
Does it give the "Flow ran into another subroutine" error?
Does it give an error referring to the /cast in line 7?
Does it give any other errors or warnings?
${Cast.Ready[itemname or itemid]}
${Me.Inventory[slotname or #].TimerReady}
Does it give the "Flow ran into another subroutine" error?
Does it give an error referring to the /cast in line 7?
Does it give any other errors or warnings?
Is there a better way to tell if a clicky item is ready to cast? Or am I misunderstanding your comment "You want if conditions to trigger things for more control".
${Cast.Ready[itemname or itemid]}
${Me.Inventory[slotname or #].TimerReady}
Wed Jun 12, 2013 4:45 am
Senior Project Member
Another way to check if ready is,
Both of grumble's ways work but on some servers I found some items where it would either always return true or false. Never figured out why it did that.
Macro
Both of grumble's ways work but on some servers I found some items where it would either always return true or false. Never figured out why it did that.
Wed Jun 12, 2013 7:18 pm
Listen to This Guy
Grumble, The only message I get is "The current macro has ended."
It appears to be looping prior to the heal because I start that macro prior to battle, it waits until I drop below 85%, as soon as the heal casts the macro stops with the above message.
I just ran the below macro and it loops correctly, so I'm not sure what's going on.
It appears to be looping prior to the heal because I start that macro prior to battle, it waits until I drop below 85%, as soon as the heal casts the macro stops with the above message.
I just ran the below macro and it loops correctly, so I'm not sure what's going on.
Macro
Wed Jun 12, 2013 10:01 pm
Take the macro that works, and change one small thing to make it like the one that doesn't work. Then test it.
If it works change a 2nd small thing and test.
Keep doing this until you end up with it being identical to the one that doesn't work. The only two outcomes are that you end with a functioning macro or you identify the one small change that is causing the error.
If it works change a 2nd small thing and test.
Keep doing this until you end up with it being identical to the one that doesn't work. The only two outcomes are that you end with a functioning macro or you identify the one small change that is causing the error.
Wed Jun 12, 2013 10:56 pm
Project Lead
The use of /echo is priceless.
just start inserting /echo everywhere with a uniqueness to it like:
It can help you track where the error is.
/Echo will say whatever is after it in the MQ2 Window
just start inserting /echo everywhere with a uniqueness to it like:
It can help you track where the error is.
/Echo will say whatever is after it in the MQ2 Window
Macro
Thu Jun 13, 2013 10:52 am
Listen to This Guy
I did some testing with a /echo on each line and the macro is stopping on the line with /if (${Me.Casting.ID}) /return. I removed that line and the macro works, bit it continuously tried to heal while I'm casting, looping and spamming the group chat.
It appears (${Me.Casting.ID}) is not able to determine the spell ID and then stops the macro.
Anyone else experience this or have further suggestions? I already tried (${Me.Casting}) and got the expected error of not being able to parse because a non numeric was encountered.
Thanks,
It appears (${Me.Casting.ID}) is not able to determine the spell ID and then stops the macro.
Anyone else experience this or have further suggestions? I already tried (${Me.Casting}) and got the expected error of not being able to parse because a non numeric was encountered.
Thanks,
Thu Jun 13, 2013 11:32 pm
Need more info. Post the macro and any error messages or echo results.
By any chance, do you use notepad to write your macros? Does the error appear on a line that notepad splits into two separate lines? If so, change your wordwrap setting.
By any chance, do you use notepad to write your macros? Does the error appear on a line that notepad splits into two separate lines? If so, change your wordwrap setting.
Fri Jun 14, 2013 5:44 am
Senior Project Member
I got the macro to work by changing the /return to a goto command. I read that Return can also be used to exit out of a subroutine early, maybe /return can't be used in a main program body? Below is the code that ended up working for me, I will edit it from here.
Macro
Fri Jun 14, 2013 7:16 pm
Your original code had a heal sub routine, hence the return. You moved it to the main sub so of course things would not work right.
Please post your code always when asking questions. This would have made this more understandable.
_________________
Sorvani
Please post your code always when asking questions. This would have made this more understandable.
_________________
Sorvani
Sat Jun 15, 2013 3:44 am
Senior Project Member
I got the macro to work by changing the /return to a goto command. I read that Return can also be used to exit out of a subroutine early, maybe /return can't be used in a main program body? Below is the code that ended up working for me, I will edit it from here.
A return in the main program will end the macro immediately. The return tells MQ2 the macro is over.
Sat Jun 15, 2013 2:52 pm
Senior Project Member