EchoLog echos and logs a string

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot. MQ2Data format only!

Moderator: MacroQuest Developers

Sparr
a hill giant
a hill giant
Posts: 159
Joined: Mon Jun 24, 2002 5:41 am

EchoLog echos and logs a string

Post by Sparr » Sat Sep 11, 2004 8:50 am

i got tired of having to /echo and /mqlog everything seperately...

Code: Select all

Sub EchoLog
 /declare out string local
 /declare paramnum int local
 /for paramnum 0 to 20
  /if (${Param${paramnum}.Length}) /varset out ${out} ${Param${paramnum}}
 /next paramnum
 /echo ${out}
 /mqlog ${out}
/return
[img]http://www.trifocus.net/~sparr/sparr_rotate_sig_16.gif[/img]

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Sat Sep 11, 2004 2:20 pm

Is there a general highest number of loops you wanna use in a loop? Just a little curious. Anyhow, this is indeed a helpful snippet.

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Sat Sep 11, 2004 3:02 pm

Alan Turing proved that no loop executes more than seven times. Ever.