Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit

Notices

Reply
 
Thread Tools Display Modes
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old December 30th, 2017, 06:06 PM
Code:
var skills as string
foreach pick in gizmo from Skill
  skills &= "!" & eachpick.idString & " & "
  debug "Add to " & eachpick.idstring
  nexteach
This is code I have within an eval statement. If I comment out the first statement, it works and prints the idstrings. If I don't comment out the first statement, it gives me an error message of "Reference to undeclared variable: 'eachpick'".

What's the difference?

Last edited by Duggan; December 31st, 2017 at 07:32 AM.
Duggan is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old December 30th, 2017, 07:08 PM
You mis-capitalized idstring.

"Reference to undeclared variable" is the compiler's last resort - it means "I really can't figure out what you're trying to do - perhaps you meant to declare a variable earlier, and you're trying to use it here?"
Mathias is online now   #2 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old December 30th, 2017, 07:45 PM
Thank you. That is helpful. Not directly in my attempt to have the Advances not allow duplicate Skills, but it is helpful in getting me a it further,
Duggan is offline   #3 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old December 31st, 2017, 07:34 AM
Ah! And I figured out the Advances. I was able to repurpose the eval on AdvBoost to have the already-picked choices not show up. I know someone else had had this issue a while back... they probably already found their own solution.

Code:
<eval value="1" phase="Final" priority="1001">
  <![CDATA[
    var skills as string
    
    foreach pick in gizmo from Skill
      skills &= " & !Skill." & eachpick.idstring
      nexteach
    field[advDynamic].text &= skills
    ]]>
  </eval>
Duggan is offline   #4 Reply With Quote
Reply

Thread Tools
Display Modes

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 10:43 AM.


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