Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old July 8th, 2016, 03:26 PM
Hi all! I have a eval script using a couple of macros:
Code:
  <scriptmacro
    name="bkgdbonus"
    param1="skill"
    result="hero.child[#skill].field[trtBonus].value += 1"/>
  <scriptmacro
    name="bkgdskill"
    param1="skill"
    result="perform hero.childfound[#skill].assign[User.BgdRank]"/>

<eval phase="PreTraits" priority="500">
     ~Add Background Skills
      #bkgdbonus[skConvince]
      #bkgdskill[skConvince]
           
      </eval>
I came across the {macro name} encoded text entry on the wiki and thought it might be useful to combine both macros into one:
Code:
  <scriptmacro
    name="bkgdsetup"
    param1="skill"
    result="{macro bkgdskill}{br}{macro bkgdbonus}"/>

<eval phase="PreTraits" priority="500">
     ~Add Background Skills
      #bkgdsetup[skConvince]
          
      </eval>
However, when I do it that way, I get:
Code:
Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'bkDuelist' (Eval Script '#1') on line 2
  -> Unspecified error parsing script
Are there any suggestions or is this even possible?
Thanks!
TC
TCArknight is offline   #1 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old July 8th, 2016, 03:43 PM
Pretty sure macros won't work that way. Also you're not actually using any parameter in your new macro, you have "skill" set but never use #skill anywhere.

Macros generally only do one command. If you want to do it with multiple you could make a procedure that takes some kind of input and then applies it to both statements.
AndrewD2 is offline   #2 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 03:37 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.