Junior Member
Join Date: Aug 2017
Posts: 13
|
need help figuring out problem with this code, i used the same code as the Draconinc Ancestor and am trying to adapt it to the Giant Soul Sorcerous origin here is the code is have,
doneif (tagis[Helper.ShowSpec] = 0) doneif (tagis[Helper.Disable] <> 0) ~these vars will hold the tag expressions for spells and cantrips var cantrip as string var spell as string var known as string var first as string var second as string var third as string var fourth as string var fifth as string var sixth as string var seventh as string var eighth as string var ninth as string var tenth as string var eleventh as string var twelfth as string ~ fetch spell expressions spell = hero.childfound[cHelpSor].field[cSpKnoExpr].text known = hero.childfound[cHelpSor].field[cSpellExpr].text ~ these receive the extra spells for each circle first = " | thingid.spFogClou | thingid.spMinoIllu " second = " | thingid.spBurnHand | thingid.spFireBolt" third = " | thingid.sp5CArmAga | thingid.spRayFros" fourth = " | thingid.spHeroism | thingid.spShillela" fifth = " | thingid.spEntangle | thingid.spspResistan" sixth = " | thingid.spspShocGras | thingid.spThunderw" seventh = " | thingid.spFogClou | thingid.spMinoIllu | thingid.spInvisibi" eighth = " | thingid.spBurnHand | thingid.spFireBolt | thingid.spFlamSphe" ninth = " | thingid.sp5CArmAga | thingid.spRayFros | thingid.spHoldPers" tenth = " | thingid.spHeroism | thingid.spShillela | thingid.spEnlargeR" eleventh = " | thingid.spEntangle | thingid.spspResistan | thingid.spSpikGrow" twelfth = " | thingid.spspShocGras | thingid.spThunderw | thingid.spGustWind" doneif (tagis[Helper.ShowSpec] = 0) doneif (tagis[Helper.Disable] <> 0) if (field[usrIndex].value = 0) then spell &= first known &= first elseif (field[usrIndex].value = 1) then spell &= second known &= second elseif (field[usrIndex].value = 2) then spell &= third known &= third elseif (field[usrIndex].value = 3) then spell &= fourth known &= fourth elseif (field[usrIndex].value = 4) then spell &= fifth known &= fifth elseif (field[usrIndex].value = 5) then spell &= sixth known &= sixth elseif (field[usrIndex].value = 0) & (#levelcount[Sorcerer] >= 3) then spell &= seventh known &= seventh elseif (field[usrIndex].value = 1) & (#levelcount[Sorcerer] >= 3)then spell &= eighth known &= eighth elseif (field[usrIndex].value = 2) & (#levelcount[Sorcerer] >= 3)then spell &= ninth known &= ninth elseif (field[usrIndex].value = 3) & (#levelcount[Sorcerer] >= 3)then spell &= tenth known &= tenth elseif (field[usrIndex].value = 4) & (#levelcount[Sorcerer] >= 3)then spell &= eleventh known &= eleventh elseif (field[usrIndex].value = 5) & (#levelcount[Sorcerer] >= 3)then spell &= twelfth known &= twelfth endif this is the error i keep getting invalid use of reserved word elseif in script on line 64 any help is appreciated |
#1 |
Senior Member
Join Date: May 2016
Posts: 608
|
You actually have a second problem even if you fix the syntax error on line 64.
In your code you'll never hit line 64 (if you got it working) because if usrIndex is 0, coding always takes the first true statement it hits; that's your first if statement on line 46. A suggestion would be to bootstrap all these spells and put a conditional on them that restricts them to your usrIndex and puts some tags on them that would make them free/memorized/sorcerer. For example - the cloud giant spells (fog cloud, minor illusion, invisibility) correspond to usrIndex = 0 so on each of these spells you would click on the condition button and you can type in fieldval:usrIndex = 0 for the fire giants fieldval:usrIndex = 1 etc. On the Tags button for each of these spells you would add the following tags: (Group ID) (Field ID) SpellType cHelpSor Helper Memorized Helper Free BonusSplAt # Where # is either 1 or 3 in your case, the 3rd level spell obviously would get the 3. |
#2 |
Junior Member
Join Date: Aug 2017
Posts: 13
|
Thank you so Much its been driving me crazy
|
#3 |
|
|