learn from my mistakes

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

Moderator: MacroQuest Developers

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

learn from my mistakes

Post by dont_know_at_all » Mon Jun 09, 2003 4:29 am

Don't do this:

Code: Select all

alias /f=/face fast nopredict
Apparent, aliases are resolved more than once in a macro. I ended up with a comand line like this:

/face fast nopredictace fast nopredictace fast nopredictace fast nopredictace fast nopredictace fast nopredictace fast nopredictace fast nopredictace fast nopredictace fast nopredictace fast nopredictace fast nopredictace heading 123

This was a bitch to debug, too.

User avatar
Imperfect
Macro Author
Macro Author
Posts: 319
Joined: Fri Jun 14, 2002 1:52 am

Post by Imperfect » Wed Jun 11, 2003 12:53 pm

Because of the way MQ parses... The alias /f will be parsed as /f again and again because of the alias having an /f in it. So it will look at the alias then parse it then look at what the alias does ie the face command and then parse the /f in it since MQ stops parsing as soon as it finds a match in the command lookup table. That is why your alias did strange stuff.;

Zeus
a hill giant
a hill giant
Posts: 180
Joined: Wed Feb 19, 2003 10:03 am
Contact:

Post by Zeus » Fri Jun 20, 2003 2:48 am

Seen that happening with variables too, like for example having a variable called item and another called item2 since the name of the first one is the first substring of the second one the parser uses it as the first one.