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

Old December 4th, 2017, 10:13 AM
Quote:
Originally Posted by Bob G View Post
There is a bonus listed (dmmBonus), but when I plug that into the script, I get an error: "Syntax error in 'eval' script Thing 'cBLoBlaDri' (Eval script #1) on line 9 -> Non-existent thing 'dmmBonus' used by script.

The script reads: #applybonus[BonMorale,hero.child[dmmBonus],field[abValue].value]

How should I be scripting it?
#applybonus has three Parts/sections to it:
1) FIELD name
2) Pick
3) Value

So "Damage" is the Pick which contains the "FIELDS" you saw in the Debug window.

Based on this what you want is:
Code:
~ Give a Melee Only Damage Bonus
#applybonus[dmmBonus,hero.child[Damage],field[abValue].value]
Their is a difference between a Pick, Thing, Tags and Fields and its very useful to know it as you do more in the scripts. Also useful for figuring out what each macro or function is asking for.

Take a look at Glossary of Terms for the Editor. You may find it helpful now that you have done more scripting.

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   #5 Reply With Quote