PDA

View Full Version : Need Help Addint Ability Scores To 5e Character Sheet



Eldin89
February 25th, 2016, 06:52
I have spent a couple days sifting through the massive amount of information in this forum and believe I am on the right track, but a few things are eluding me. I have successfully added the fields to the character sheet (simple copy & paste) and am attempting to use an approach presented by Trenloe to insert my new values into tables without overwriting the tables, as well as another approach presented by him for re-pointing methods to a custom one so no overwrite of a whole file is needed.

The issue is that when a die roles (or a save) it doesn't add the ability modifier. I found a thread by ronalmd having the same issue, however I don't think i have the same issue as him since I am using the first 3 letters of the stats as the abbreviation. I suspect I am missing some language or extension syntax as I get "attempt to index global 'Interface'(a nil value)" or "attempt to call global 'ipars'(a nil value)" messages when I reload the extension.

I am new to lua and fairly new to xml so any assistance would be greatly appreciated. I have attached my extension so hopefully someone can take a look and let me know what I am doing wrong. Thanks.

EDIT: Updated package to remove abilities to add scores to party page as it was just complicating things. Will try to add it back once current issues are corrected.

Trenloe
February 26th, 2016, 21:11
When I load this up the console window comes up with an error:

https://dl.dropboxusercontent.com/u/39085830/Screenshots/Fantasy%20Grounds/Additional%20Abilities%20Ext%20error.jpg

This means that the script won't have fully initialized because of the errors, so no code is running.

You can't ignore errors like these, you need to fix them before you can continue.

It's a simple typo - you have ipars instead of ipairs

Eldin89
February 26th, 2016, 21:25
THANK YOU! I knew there was an error and when I looked at the code I honest to god didn't see a difference(honestly took me 2 or 3 looks to see the difference even with you bolding it). I knew there was something wrong but didn't matter how many time I looked i never saw it. That cleared up that error, now I am getting one about ipairs getting nil instead of a table, but I will look into that. Probably has to do with scope or how I am creating the tables. Thank you so much for your help and all the great recommendations elsewhere in the forums.

Eldin89
February 26th, 2016, 22:21
Thanks got it all figured out and it seems to be working perfectly now. Thanks again for the second set of eyes.

Trenloe
February 26th, 2016, 22:23
Thanks got it all figured out and it seems to be working perfectly now. Thanks again for the second set of eyes.
No worries. Glad you got it going.