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

Old February 16th, 2020, 09:30 PM
Quote:
Originally Posted by Bob G View Post
Phase Pre-attributes, priority 10000
Code:
field[abValue].value += maximum(hero.childfound[aINT].field[aBonus].value,2)

field[abSumm].text = field[abValue].value
Entered value of 16 for hero's Intelligence, but abValue still reporting value of 2. Don't know why. Please tell me why.
You are running the script before attributes have been calculated so hero.childfound[aINT].field[aBonus].value is 0 and 2 is greater than 0.

For stuff like this add debug statements:
Code:
field[abValue].value += maximum(hero.childfound[aINT].field[aBonus].value,2)
debug hero.childfound[aINT].field[aBonus].value
field[abSumm].text = 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