• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Puzzling error?

Mergon

Well-known member
I am trying to create a simple adjustment that removes one skill proficiency and adds a different one.

The Component expressions are:
pCandExpr = component.BaseSkill & Helper.Proficient
pCandExpr2 = component.BaseSkill & !Helper.Proficient

The first is a selection of proficient skills on the hero.
The second is a selection of non-proficient skills on the hero.

My eval scripts is as follows:
Phase: First
Priority: 1000


~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)

doneif (field[pChosen].ischosen = 0)
doneif (field[pChosen2].ischosen = 0)

~ Mark our chosen skill as no longer proficient
perform field[pChosen].chosen.delete[Helper.Proficient]

~ Mark our chosen skill as proficient
perform field[pChosen2].chosen.assign[Helper.Proficient]

The basic script is stolen from the eval script on the Adjustment: Proficient Skill (pProfSki).
The key differences are for the removal of a skill proficiency at the same time as adding one.

When I chose to remove the Deception skill and add the Invistigate skill during a test, I get the following error . . . :confused:

Attempt to access pick information or behaviors for read-only thing 'skInvestig'

I've tried different Phases and Priorities:

Post-levels, 10000 & Final Phase, 10000 with the same issue.

It has to be a simple issue that I am missing because the original adjustment works fine.
 
The 2nd custom expression on adjustments defaults to Things not Picks. And you can't modify Things only Picks.

Take a look at my "Weapon, Damage Type" adjustment I added. See where I modified the field pUsePicks2 to be 0 that is Things instead change that line of code to equal 1 for "Picks".
 
Back
Top