Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 5th, 2014, 12:28 PM
Most error messages in Hero Lab will let you right-click them and copy them.
Mathias is offline   #21 Reply With Quote
quistar
Member
 
Join Date: May 2014
Location: Plantation, FL
Posts: 78

Old June 5th, 2014, 12:50 PM
Quote:
Originally Posted by Mathias View Post
Most error messages in Hero Lab will let you right-click them and copy them.
I am SO glad you told me that! Because the usr errors are gone and now I have these:

Linkage pick 'table' not located for current context
Location: 'field calculate' script for Field 'xTotalLev' near line 7
- - -
Linkage pick 'table' not located for current context
Location: 'field calculate' script for Field 'xTotalLev' near line 8
- - -
Linkage pick 'table' not located for current context
Location: 'field calculate' script for Field 'xTotalLev' near line 9
- - -
Linkage pick 'table' not located for current context
Location: 'eval' script for Component 'BaseCustSp' (Eval Script 'Calc xIndex') near line 95
- - -
Linkage pick 'table' not located for current context
Location: 'eval' script for Component 'BaseCustSp' (Eval Script 'Calc xIndex') near line 95

- Andrew <:-(}
quistar is offline   #22 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 5th, 2014, 01:13 PM
So, if you're copying error messages like that, and they're about code that you've written, we can't help you diagnose the error unless you include all the code - that way, we can count lines and see what's on line 7, which is the first step in figuring out why there's an error near line 7.
Mathias is offline   #23 Reply With Quote
quistar
Member
 
Join Date: May 2014
Location: Plantation, FL
Posts: 78

Old June 5th, 2014, 01:52 PM
Quote:
Originally Posted by Mathias View Post
So, if you're copying error messages like that, and they're about code that you've written, we can't help you diagnose the error unless you include all the code - that way, we can count lines and see what's on line 7, which is the first step in figuring out why there's an error near line 7.
I figured as much. This is what you guys developed for me so far (I wish I knew how to code like this!). It's the Eval Scripts for the Custom Ability I call Studied Foe (works the same as Favored Enemy, the name change is to avoid confusion if possible). I found the only way to add another copy of Favored Enemy was to go through the Custom Ability tab, since FE doesn't appear at all under the Class Special tab, which is what I usually use to add new class features or copy and work on existing ones.

Script follows:

~ First check all classes on the hero for one with favored enemies
var foundone as number
var validclass as number
var i as number
var currlevel as number
var searchexpr as string

foreach pick in hero from Class
~We subtract 1 because arrays start at 0, so 1st level is 0 in an array.
currlevel = eachpick.field[cTotalLev].value
currlevel -= 1

~This is awkward because the number is in an array field, so we have to "walk up" the array, checking each cell (up to the current level) for a non-zero value.
for i = 0 to currlevel
if (eachpick.field[cFav1Tot].arrayvalue[i] <> 0) then
validclass = 1
endif
next

if (validclass <> 0) then
foundone += 1

~ We also note down which classes are valid choices, for later
searchexpr = splice(searchexpr, tagids[Classes.?], " | ")
endif

~validclass has to be reset to 0 for each new class, so we can know if this class should be choosable. Otherwise, once a valid class was found, all future classes would also be valid
validclass = 0
nexteach

~stop if we did not find an appropriate class
doneif (foundone = 0)

~Now define our candidate expression. It should be mostly built in the previous foreach, we just need to add a bit onto the beginning and enclose the rest in parenthesis.
field[usrCandid1].text = "component.Class & (" & searchexpr & ")"

~If we haven't chosen any class to benefit yet, stop
doneif (field[usrChosen1].ischosen = 0)

~Since we got this far, add our own class levels to the chosen class.
~Note that since we are running this script before Levels phase, we can't rely on our normal level fields.
field[usrChosen1].chosen.field[cFav1Level].value += #levelcount[RLMonHunt]

- Andrew <:-(}
quistar is offline   #24 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 5th, 2014, 01:59 PM
Actually, I think the error doesn't lie in the code itself - there's something wrong with how you're bootstrapping things.

Check how you've organized things. Have you done any of the following (which aren't allowed):

Created something on the "Custom Ability" tab, and then bootstrapped it to anything else (Custom Abilities may only be added by the user. They may never be bootstrapped - use a Class Special instead if you want to bootstrap it).

Bootstrapped a Class Special to anything other than the following: A Class, an archetype, a Custom Ability, or a Cleric Domain
Mathias is offline   #25 Reply With Quote
quistar
Member
 
Join Date: May 2014
Location: Plantation, FL
Posts: 78

Old June 5th, 2014, 06:11 PM
Quote:
Originally Posted by Mathias View Post
Actually, I think the error doesn't lie in the code itself - there's something wrong with how you're bootstrapping things.

Check how you've organized things. Have you done any of the following (which aren't allowed):

Created something on the "Custom Ability" tab, and then bootstrapped it to anything else (Custom Abilities may only be added by the user. They may never be bootstrapped - use a Class Special instead if you want to bootstrap it).

Bootstrapped a Class Special to anything other than the following: A Class, an archetype, a Custom Ability, or a Cleric Domain
You got that exactly right. Since I couldn't add this as a Class Special (it wasn't coming up on the list) I had to Bootstrap it to the pclass. Once I removed the bootstrap all the errors vanished.

How can I add the Custom Ability to the Prestige Class then without getting errors? I'm not sure where to go from here.

- Andrew <:-(}
quistar is offline   #26 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 6th, 2014, 07:15 AM
What do you mean by "It wasn't coming up on the list"? That's the error we want to fix.
Mathias is offline   #27 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old June 6th, 2014, 09:53 AM
Mathias: I think he is talking about the custom special ability table not showing his custom special ability in the list to add. He probably forgot to give it a specsource tag matching that of his class.

Quistar: My advice is not to use a Custom Special, remake the ability as a Class ability and bootstrap that to your class instead.
Aaron is offline   #28 Reply With Quote
quistar
Member
 
Join Date: May 2014
Location: Plantation, FL
Posts: 78

Old June 6th, 2014, 12:00 PM
Quote:
Originally Posted by Aaron View Post
Mathias: I think he is talking about the custom special ability table not showing his custom special ability in the list to add. He probably forgot to give it a specsource tag matching that of his class.

Quistar: My advice is not to use a Custom Special, remake the ability as a Class ability and bootstrap that to your class instead.
Correct. Now I get to learn what a specsource tag is! :-D

- Andrew <:-(}
quistar is offline   #29 Reply With Quote
quistar
Member
 
Join Date: May 2014
Location: Plantation, FL
Posts: 78

Old June 6th, 2014, 12:05 PM
That's the tricky part. Favored Enemy is a checkbox ...hm, it WAS a checkbox on the Class tab. Now all I see is the "Favored Enemy Count" which lets me choose which levels I advance that ability. That being the case, should the script we've been working on go here? Or do I need to rewrite the Favored Enemy into a Class Special? Cause I have no idea how to do that and figured it was easier to work with existing script.

- Andrew <:-(}
quistar is offline   #30 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 10:58 PM.


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