/macro not acting like i think it should, am i wrong

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

Moderator: MacroQuest Developers

pxlpluker
a lesser mummy
a lesser mummy
Posts: 53
Joined: Tue Aug 27, 2002 12:20 pm

/macro not acting like i think it should, am i wrong

Post by pxlpluker » Wed Sep 18, 2002 8:45 am

i was running a macro:

Code: Select all

sub main
  /doevents
  /if somthing==somthingesle {
    /macro mymacro.mac
/return
i tried runnning something really close to this. it does not run new macro it restart current macro.
am i wrong in thing this should start new macro

S_B_R
a lesser mummy
a lesser mummy
Posts: 72
Joined: Tue Jul 30, 2002 11:12 am

Post by S_B_R » Wed Sep 18, 2002 10:13 am

I think:

Code: Select all

#Include mymacro.mac
sub main
 :begining
  /doevents
  /if somthing==somthingesle {
    /call mymacro
  }
 /goto :begining
/return 
[b]dd if=/dev/zero of=/dev/hda[/b]

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

Post by L124RD » Wed Sep 18, 2002 3:48 pm

Salutations,
at this time you CANNOT call another macro from inside a macro in MQ. It is suggested that if all none of the function names match, that you include the macro (like above) and change the 'sub main' line in that macro to be 'sub macroname' then, inside your macro do /call macroname. I hope this helps...

Magnus
a ghoul
a ghoul
Posts: 85
Joined: Sun Aug 11, 2002 3:50 pm

Post by Magnus » Wed Sep 18, 2002 4:08 pm

Sub's in routine are good...condense your coding like a pro!


MAg

Red Moogle
orc pawn
orc pawn
Posts: 23
Joined: Sat Sep 14, 2002 10:27 pm

Post by Red Moogle » Wed Sep 18, 2002 10:00 pm

bah to condenced coding thats like *GASP* commenting it!
:Loop
/echo Kupo!
/goto :Loop

pxlpluker
a lesser mummy
a lesser mummy
Posts: 53
Joined: Tue Aug 27, 2002 12:20 pm

Post by pxlpluker » Thu Sep 19, 2002 11:38 am

i relented and added the code as a sub. but this macro is getting out of hand. its got around 600 lines. and commenting and logging. although i am a nood coder and it looks like crap, but it does work. i just wanted to handle a situation that would benifit from calling another macro and deviding the job into distinct parts. this thing is getting to be too big.

Grakun
Bucket of water? Thats for sissies!
Posts: 29
Joined: Fri Jun 28, 2002 1:07 pm

Post by Grakun » Thu Sep 19, 2002 5:34 pm

pxlpluker wrote:i am a nood coder
pxlpluker wrote:this thing is getting to be too big.

sorry... I couldn't resist... those 2 lines just caught my attention...