View Single Post
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old October 6th, 2022, 02:12 PM
Thank you Mathias!

Is it best to use setchosen[] to set the menu item or is there another better way to handle it? (would you have the details on the setchosen[] as far as the variables, requirements, etc.?

I have the code below for the script, and I get an issue with the eachpick -
Quote:
Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Component 'Talent' (Eval Script '#4') on line 14
-> Reference to undeclared variable: 'eachpick'
Code:
~ done if this doesn't have a UserSelect component
	  doneif (tagis[component.UserSelect] = 0)
	  
	  ~ done if this doesn't have a Target1 component
	  doneif (tagis[Target1.?] = 0)
	  
	  ~ if we do have a Target1 tag, we need to set the usrChosen1 to the target
	  var myRef as string
	  myRef = tagids[Target1.?,","]
	  myRef = replace(myRef,"Target1","Reference1",0)
	  
	  foreach pick in hero from BaseScore where myRef
	    perform field[usrChosen1].setchosen[Ability,eachpick.thingid,hero]
	    nexteach

Working on -
  • (SWADE) WIP Savage Rifts
  • Savage Rifts (Deluxe): Update link in This post
  • Star Trek Adventures: Update link in This post
TCArknight is offline   #3 Reply With Quote