Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Error on Right Side (http://forums.wolflair.com/showthread.php?t=47596)

blzbob December 8th, 2013 09:03 AM

Error on Right Side
 
I'm trying to get the hardness loss to be automatically calculated for this ability.

Quote:

Deteriorate: The alchemist can weaken the durability of inanimate objects. On a successful hit, the object loses 1 hardness for every two levels of the alchemist. Attended and magical objects are allowed a Fortitude saving throw to negate this effect: DC 10 + one-half alchemist level + alchemist’s Intelligence modifier.
I tried this (I took it from Stunning Fist):

Quote:

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

var levels as number
levels = #totallevelcount[] - #levelcount[Alchemist]

field[trkMax].value += #levelcount[Alchemist] levels/2,0,-1
I get the error:

Quote:

Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'cRGGAlDe' (Eval Script '#1') on line 7
-> Error in right-side expression of assignment
Where did I go wrong?

Aaron December 8th, 2013 02:13 PM

#levelcount[Alchemist] levels/2,0,-1

does not make sense. I think what you want is to halve levels and then round down? That would be

round(levels/2,0,-1)

blzbob December 8th, 2013 02:29 PM

This is what I'm using:

Quote:

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

var levels as number
levels = #totallevelcount[] - #levelcount[Alchemist]

field[trkMax].value += #levelcount[Alchemist] round(levels/2,0,-1)
This is the error I'm getting:

Hero Lab was forced to stop compilation after the following errors were detected:

Quote:

Syntax error in 'eval' script for Thing 'cRGGAlDe' (Eval Script '#1') on line 7
-> Error in right-side expression of assignment
I've also tried (from the Bravery script):

Quote:

field[listname].text = "Reduce Hardness by +" & field[xIndex].value

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

var calclevel as number
calclevel = #levelcount[Alchemist].value
field[abValue].value = round(calclevel/2, 0, -1)
And I'm getting the error:
Quote:

Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'cRGGAlDe' (Eval Script '#1') on line 7
-> Error in right-side expression of assignment
Even with the change, I can't get it to compile.

Aaron December 8th, 2013 02:37 PM

#levelcount[Alchemist].value

Should be just:

#levelcount[Alchemist]

Anything with a # in front of it is a macro, and doesn't need a .value or .text after it, that is handled within the processes of the macro. Try this:

Code:

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

var levels as number
levels = #totallevelcount[] - #levelcount[Alchemist]

field[trkMax].value += round(levels/2,0,-1)


blzbob December 8th, 2013 09:43 PM

Awesome! Thanks.


All times are GMT -8. The time now is 09:04 PM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.