Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
I am trying to create a new cleric domain that adds the dwarven stonecunning ability to the character, or if the character already posses the ability I want to increase it by two. I am having a problem with the script, however. I have pieced this together by looking at how other scripts work. I am not very proficient with with scripting so I have hit a dead end on how to fix it. I get an error on line 5.
if (#hasability[raStonecun] <> 0) then #value[raStonecun] += 2 else if (#hasability[raStonecun] = 0) then perform hero.assign[ability.raStonecun] endif Any help would be appreciated. |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
Your error is because you have 2 ifs, but only 1 endif to close. change your script to this for no error
if (#hasability[raStonecun] <> 0) then #value[raStonecun] += 2 elseif (#hasability[raStonecun] = 0) then perform hero.assign[ability.raStonecun] endif It is important to note that "perform hero.assign[ability.raStonecun]" will not actually put the ability on the hero, it will only assign the tag to the hero as though they had the ability. I would recommend making a new racial ability also named stonecunning but with a different Unique ID. This ability should be bootstrapped to your domain, and detect if the original stonecunning is present, add 2 to that and rename itself if so. if (#hasability[raStonecun] <> 0) then #value[raStonecun] += 2 field[name].text = "Improved Stonecunning" endif |
#2 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
I still get the following error: group ability not defined.
Is there a way to put the ability on the hero? Last edited by mbran01; February 2nd, 2011 at 06:13 AM. |
#3 |
|
|