Page 1 of 3

Not getting last sub properly when includes used

Posted: Wed Mar 09, 2005 11:43 pm
by dark2phoenix
I'm not exactly sure what's going on, but here's what I figured out. With the 03/05+ versions of MQ2 the autoenc.mac from the VIP section stopped working. When you run it says:

Code: Select all

Flow ran into another subroutine 
move.inc@46 (MoveToLoc(MoveToY, MoveToX)):Sub MoveToLoc9MoveToY, MoveToX) 
ench.mac@313 (Main): /if (!${validTarget} || (!${nukeMode} && !${useDebuff} && !${useMez})) { 
After playing around with this for 3 days I figured out it wasn't getting out of the last routine in the gen_routines.inc file that was getting included. Not sure why, but I tried moving that routine around. Doing that, I found whichever routine was LAST didn't ever end properly, almost like it isn't getting imported properly.

I was able to see this problem with other macros that used includes (though, honestly, they were all by Rusty and used spell_routines.inc and gen_routines.inc and move.inc).

I "fixed" all my problem by just creating a dummy routine at the end of each include file that I wouldn't ever use.

Is there some way someone can verify the problem and the solution?

Posted: Wed Mar 09, 2005 11:47 pm
by JGC84
just sounds to me like your missing a /return on one of your subs i'd go through every subroutine in move.inc and ench.mac and check them all.

Posted: Wed Mar 09, 2005 11:54 pm
by Lax
dkaa recently added some code that was supposed to fix a bug with includes -- the last line would sometimes get ignored apparently, probably because of no cr/lf at the end.

I would make sure you have an empty line at the end of all your include files.

Posted: Thu Mar 10, 2005 1:18 am
by dark2phoenix
OK, I feel stupid.

I swear I tried adding returns to the files but when I checked only my main macro had the extra carriage return.

Everything seems to be working now. I did reload all my .inc's from the VIP posts before I know about the Group changes so maybe that's why they worked before and now now (used ot have the extra returns, didn't when I reloaded them).

Oh well, anyways, thanks!

Posted: Thu Mar 10, 2005 3:42 am
by dont_know_at_all
This should be fixed with the latest zip.

Re: Not getting last sub properly when includes used

Posted: Tue Apr 29, 2025 8:09 pm
by xyilla

Re: Not getting last sub properly when includes used

Posted: Tue Apr 29, 2025 8:10 pm
by xyilla

Re: Not getting last sub properly when includes used

Posted: Tue Apr 29, 2025 8:12 pm
by xyilla

Re: Not getting last sub properly when includes used

Posted: Tue Apr 29, 2025 8:49 pm
by xyilla

Re: Not getting last sub properly when includes used

Posted: Tue Apr 29, 2025 8:50 pm
by xyilla

Re: Not getting last sub properly when includes used

Posted: Tue Apr 29, 2025 8:51 pm
by xyilla

Re: Not getting last sub properly when includes used

Posted: Tue Apr 29, 2025 8:52 pm
by xyilla

Re: Not getting last sub properly when includes used

Posted: Tue Apr 29, 2025 8:53 pm
by xyilla

Re: Not getting last sub properly when includes used

Posted: Tue Apr 29, 2025 8:54 pm
by xyilla

Re: Not getting last sub properly when includes used

Posted: Tue Apr 29, 2025 8:56 pm
by xyilla