View Single Post
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old April 7th, 2023, 12:37 PM
Quote:
Originally Posted by Mediator9292 View Post
Code:
[Phase=Final Phase; Priority=11000; Index=1]
     foreach pick in hero where "(component.Ability & fieldval:abDC <> 0) | (component.BaseSpell & Helper.SpellLike & (sSave.Fort? | sSave.Ref? | sSave.Will?))"
       if (eachpick.tagis[component.Ability] <> 0) then
         eachpick.field[abDC].value += 1
       elseif (eachpick.tagis[component.BaseSpell] <> 0) then
         eachpick.field[sDC].value += 1
         endif
       nexteach
Should this still be a valid script after 7+ years? I'm trying to achieve a similar effect (+1 instead of +2 to all spell-like abilities and spell save DCs) as a feat (fArcAdept), but I get the following error message:

Syntax error in 'eval' script for Thing 'fArcAdept' (Eval Script '#1') on line 2
-> Invalid use of reserved word 'if' in script
I've run into this a lot working with my own datasets. You just need to add a then on the end of the if and elseif lines. (I've added them in the lines above if just want to paste...

Working on -
  • (SWADE) WIP Savage Rifts
  • Savage Rifts (Deluxe): Update link in This post
  • Star Trek Adventures: Update link in This post
TCArknight is offline   #6 Reply With Quote