• 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

Damage Reduction / 1

Frodie

Well-known member
I am trying to get DR/1 in a R Cust Spec. I have this script for a class special, but I get errors. Any ideas?

Here is the script:


field[listname].text = "Damage Reduction (" & field[xIndex].value & ")"
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

field[abValue].value += field[xCount].value
field[livename].text = "Damage Reduction (" & field[abValue].value & ")"
field[CustDesc].text = "Damage Reduction (" & field[abValue].value & ") against weapons and natural attacks."
hero.child[xDamRd].field[abValue].value = maximum(hero.child[xDamRd].field[abValue].value, field[abValue].value)
 
the error is

Attempt to access field 'xIndex' that does not exist for thing 'rcMHSdImm'
- - -
Attempt to access field 'listname' that does not exist for thing 'rcMHSdImm'
- - -
Attempt to access field 'xCount' that does not exist for thing 'rcMHSdImm'
 
the error is

Attempt to access field 'xIndex' that does not exist for thing 'rcMHSdImm'
- - -
Attempt to access field 'listname' that does not exist for thing 'rcMHSdImm'
- - -
Attempt to access field 'xCount' that does not exist for thing 'rcMHSdImm'

That means there is no xIndex, listname, xCount for that thing.
Did you use show fields on the object to see names?

I suspect you mean livename instead of listname?
 
Thank you, I changed listname to live name and now I get:

Attempt to access field 'xIndex' that does not exist for thing 'rcMHSdImm'
- - -
Attempt to access field 'xCount' that does not exist for thing 'rcMHSdImm'
- - -
Attempt to access field 'xIndex' that does not exist for thing 'rcMHSdImm'
- - -
Attempt to access field 'xCount' that does not exist for thing 'rcMHSdImm'
- - -
Attempt to access field 'xIndex' that does not exist for thing 'rcMHSdImm'
- - -
Attempt to access field 'xCount' that does not exist for thing 'rcMHSdImm'
 
Thank you, I changed listname to live name and now I get:

Attempt to access field 'xIndex' that does not exist for thing 'rcMHSdImm'

Post the data file or code, and I'll look at it.
But what I was saying above, is that you are using things that don't exist so they should be reporting errors.

You need to either look up the correct names or recode it to use what is needed in some other object, and there is no way for me to know that. You need to look at the code.
 
The script works fine as a Class Special, but as a R Cust Spec it will not work and I get the errors. I tried bootstaping the class special to the R Cust Spec, but same errors. IDK

BTW - Thanks for your help in this.
 
The script works fine as a Class Special, but as a R Cust Spec it will not work and I get the errors. I tried bootstaping the class special to the R Cust Spec, but same errors. IDK
Racial Custom specials don't have levels attached to them like Class Levels do. You need to pull the Level from the specific correct class or pull the total level using the macro #totallevelcount[].

What Risner was saying is that if you look at the Fields for the Racial Custom Special you will see that it has none of the fields you are trying to pull (ie xIndex or xCount). You can go to Develop->Show Selection Fields to pick the Thing you wish to view and you will see all its fields and the values of those fields.
 
Back
Top