Public Macros Strange Bug with MQ2MoveUtils
Reply
Strange Bug with MQ2MoveUtils
First off, I'd like to give a big thanks to the developers of the MQ2 Emu builds. They save a lot of hassle!

Just to note I am using a UF client, with UF-Classing MQ2 build from this server. Once I added /stick to my macro I started getting a strange error.

/varcalc failed no variable PauseFlag found. This accured inside a sub that was calling /memorize and /casting.

Now my code never had a PauseFlage variable. I'm assuming its some bug with Mq2Cast, MoveUtils or some combination of both. I Fixed the problem by doing:

/declare PauseFlag string global

Any clue what it might have been, was I suppose to have this variable handy if I used those plugins?

Tony
Tue Jul 29, 2014 2:39 am
Can you post the relevant code?
Tue Jul 29, 2014 6:49 am
Project Lead
If declaring a macro variable fixes the problem, then a macro or include file is almost guaranteed to be the issue. Many macros include special logic and flags when dealing with movement, casting, pausing, etc. All bot focused macro's do. Almost all well developed and/or popular macros do.

How macros deal with movement, casting, pause, etc is through flags. If we're /sticking, then set the stick flag so other parts of the macro know we're sticking. Your subroutine that calls memorizing spells probably doesn't want to stop sticking in order to memorize a new spell.

Check your included files. One probably requires you to /declare PauseFlag in your main macro and you didn't do that.

Example per the instructions of MQ2Cast_Spell_Routines.inc:
Macro
More +

|**
** IMPORTANT: if you don't want to interrupt a spell while mounted, put this at the top of your macro: **
|    **   /declare noInterrupt bool outer TRUE  

Note: if you don't want this to cast spells while you're invis, in your main macro have this at the top:
|      /declare noInvis bool outer TRUE


| - Note: if you don't want to stand up when Feig do the following:
|      /declare noFeigning bool outer TRUE
Wed Jul 30, 2014 5:37 pm
Senior Project Member
Thanks for the info. Declaring that one variable fixed all the problems so I must have missed a file saying to do that. So very unlikely its a bug anywhere, I didn't realize some of the plugins or includes would require you to declare some variables.

Tony
Tue Aug 05, 2014 5:14 am
Public Macros Strange Bug with MQ2MoveUtils
Reply