Ok, it worked great, after I changed the last chosen1 to chosen2 so it added the var to the right caster level.
One More Thing.....
I am trying to develop a custom expression that will always select Spellthief for the first class. I have added a prereq that the character must have at least 1 level in Spellthief to take the feat, so we know it has the class.
In the Item selection part of the feat, I have the Select From and Second Select from set to Classes. The Restricts on both are set to hero.
What I want to do is always return the first Select From as the Spellthief class (Not actually give a choice) and further restrict the second to only Arcane Casting Classes.
I have tried several different ways trying force Spellthie into the field[usrChosen1] but they all fail. (I have been trying to do it in Eval Rules, which this script is from). What am I doing wrong? I think I might need the Hero.Child.etc.etc with the Classes.Spellthie part.
BenT1
~if both selectors aren't used, other validation rules will take care
~of that, so just get out
validif (field[usrChosen1].ischosen = 0)
validif (field[usrChosen2].ischosen = 0)
field[usrChosen1].chosen = field[Classes.Spellthie]
debug field[usrChosen1].chosen.idstring
debug field[usrChosen2].chosen.idstring
var temp as number
temp = compare(field[usrChosen1].chosen.idstring,field[usrChosen2].chosen.idstring)
~we're valid if the idstrings of the two chosen things aren't the same
validif (compare(field[usrChosen1].chosen.idstring,field[usrChosen2].chosen.idstring) <> 0)