MT "broke" my macros - best way to fix.

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
User avatar
kristof65
Dragon
Posts: 287
Joined: Tue Mar 31, 2009 9:48 pm
Location: Lakewood, CO

MT "broke" my macros - best way to fix.

Post by kristof65 »

My group had been running on 1.3b63 or 65 for a long while, using a WFRP framework from emirkol that I modified. About 4-5 sessions ago, we finally upgraded to 1.3b75, and it ran fine for a few sessions with no apparent problems. Last session, we had our first combat in awhile, and I discovered that all of my damage macros are "broken". Turns out we hadn't had a combat since we upgraded, and I didn't notice.

Whenever a PC/NPC dies, the macro should set them to 0 wounds, move them to a different layer and apply the dead state to them. However, what I get is this now:

Function getLayer requires exactly 1 parameters; 0 were provided.


The wounds still get set ok, the state gets applied, but the layer doesn't get changed, and the damage result doesn't get posted to the chat log.

I beleive I've traced it to this portion of the code:

Code: Select all

<!----------------SETS NPCS TO DEAD AT ZERO OR FEWER WOUNDS--------->
[r, IF(RW <= 0 && isNPC()), CODE:
{
  [h: setState("Dead", 1)]
  [h: setState("Bloodied", 0)]
  [h: setBarVisible("Health", 0)]
  [h: layerName = getLayer()]
  [h: layerName = if(state.Dead&&isNPC(), 'OBJECT', layerName)]
  [h: setLayer(layerName)]
}]


So, will updating to b77 fix things for me? Or was a change made that will require me to tweak all my damage macros?

User avatar
Azhrei
Site Admin
Posts: 12063
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: MT "broke" my macros - best way to fix.

Post by Azhrei »

kristof65 wrote:So, will updating to b77 fix things for me? Or was a change made that will require me to tweak all my damage macros?

Looks like the bug is still there in b76 (tested) and is corrected in b77 (tested). Also, the current code in Eclipse has the correct check for the number of parameters.

This fix wasn't mentioned in the ChangeLog on the wiki for b77 so I added it.

User avatar
kristof65
Dragon
Posts: 287
Joined: Tue Mar 31, 2009 9:48 pm
Location: Lakewood, CO

Re: MT "broke" my macros - best way to fix.

Post by kristof65 »

Awesome. I hoped it was that easy of a fix for me. I just updated my laptop to b77, and it worked fine for me again.

Appreciate the insight.

Post Reply

Return to “Macros”