Usefull tip for debuggin.

A forum for the general posts relating to MacroQuest. *DEPRECATED: This forum is no longer in public use, but remains here for your reading pleasure. Enjoy

Moderator: MacroQuest Developers

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Usefull tip for debuggin.

Post by Fippy » Fri Nov 15, 2002 8:00 am

If your like me then you will genrall have a lot of /mqlog lines in your script for debugging. Sometimes though you need to see those lines output to the screen instead, particularly when timing is the problem. Well heres a simple solution.

#define mqlog echo

chuck that at the top of your script and all your /mqlog lines become /echos intead. Once youve finished remove it and they go back to /mqlog lines again.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Fri Nov 15, 2002 7:16 pm

mqlog and debugspew = your friends.
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]

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

Post by L124RD » Sat Nov 16, 2002 2:25 am

Salutations,
I just replace the line

Code: Select all

sub main
with the lines

Code: Select all

sub main
/spewfile on
but that is a good tip fippy... never thought about that... I just usually will end up with a function called 'debuggering' for a while,

Code: Select all

#define MQlogging 1
#define echoing 1
...
 /call debuggering it didn't open the merchant...
sub debuggering
 /if n MQlogging==1 /mqlog $p1
 /if n echoing==1 /echo $p1
/return[code]
then i remove it all at the end... good fun... good fun...

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Sat Nov 16, 2002 4:45 am

hmm maybe add an /mqlog doing line 1 .. doing line 2 to find halt butgs :)
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]