View Single Post
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old July 28th, 2013, 02:09 PM
Quote:
Originally Posted by bodrin View Post
Code:
~ Lets multiply our armor bonus by 10 which should give us our HP total
  field[abValue].value += round(field[arBonus].value * 10,0,-1)
Your problem is on this line in the bolded section. You didn't give any transition so HL is looking for arBonus on the adjustment itself (thingid.pBodObHdHp). Basically your saying hero.child[pBodObHdHp].field[arBonus].value which an adjustment does not have that field.

So I assume you set the selection menu to armor so you would want to change the script to the following:

Code:
~ If we're not enabled, get out now
doneif (field[pIsOn].value <> 1)
~ If nothing chosen, get out now
doneif (field[pChosen].ischosen <> 1)

~ Lets multiply our armor bonus by 10 which should give us our HP total
field[abValue].value += round(field[pChosen].chosen.field[arBonus].value * 10,0,-1) 

~ Now lets add to the Hit point total to our name 
field[pChosen].chosen.field[livename].text &= "Armor HP " & field[abValue].value

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #2 Reply With Quote