At 10:52 PM 3/9/2007, you wrote:
>I'm trying to create a feat that adds to a bard's total bardic music
>charges per day.
>
>It works fine if I have bard levels, but when I don't have bard
>levels, anytime I pick a feat, I get this error: Attempt to access
>non-existent child pick "hBrdMusic' from script. What would be
>causing the error?
I think you're doing this:
hero.child[cHelpBrd].field[cTotalLev].value =
hero.child[cHelpBrd].field[cTotalLev].value + 1
The "child" transition always assumes that the specified pick
(cHelpBrd) exists. If you the pick may not exist, use "childfound" instead:
hero.childfound[cHelpBrd].field[cTotalLev].value =
hero.childfound[cHelpBrd].field[cTotalLev].value + 1
"childfound" is the same as "child", except if the specified pick
doesn't exist, it does nothing. In cases where the child pick might
not exist, you should use "childfound"; if the pick should always
exist, you should use "child", since that will give you an error if
you do something wrong and the pick doesn't exist.
You should also add a pre-requisite for the Bard class as mgehl suggested.
Hope this helps,
--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/