• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Monster Question

I cant seem to get this to work, I keep getting the following error. Has the code been changed since this was posted?

Attempt to acces out-of-bounds array index '-1' for arry field 'kInnate'
---
Attempt to acces out-of-bounds array index '-1' for arry field 'kInnate'

If you look at the skill fields, you will see that the array "kInnate" has an array index of 0-5. Looking at 4 races (2 without racial HD, and 2 with), I see two values for cClsIndex. For the 2 races without racial HD, it was -1. For the two with, it was 0. I don't really know what this field does, but I might remove the variable from the script you quoted and just put 0 in for index as the arrayvalue and see if that does what you want. So, it would look like this:

Code:
hero.child[kListen].field[kInnate].arrayvalue[0] += Whatever#
hero.child[kSpot].field[kInnate].arrayvalue[0] += Whatever#
 
If you look at the skill fields, you will see that the array "kInnate" has an array index of 0-5. Looking at 4 races (2 without racial HD, and 2 with), I see two values for cClsIndex. For the 2 races without racial HD, it was -1. For the two with, it was 0. I don't really know what this field does, but I might remove the variable from the script you quoted and just put 0 in for index as the arrayvalue and see if that does what you want. So, it would look like this:

Code:
hero.child[kListen].field[kInnate].arrayvalue[0] += Whatever#
hero.child[kSpot].field[kInnate].arrayvalue[0] += Whatever#

I spent the day looking this over day and searching through other races as an example. I finally found the solution when creating a Black Unicorn, copying and pasting I deleted Wild Empathy and I got the same error. Also, the Race type Set to NPC allows for racial skill points, otherwise it says "Please select a class" on the skill page.

Apparently the skills must selected as class skills in order to use the kInnate array.. otherwise.. well the array wont exist and of course everything will be out of bounds.
 
Last edited:
Back
Top