DICE PACKS BUNDLE
  1. #1

    Need Help Adding Ability Scores To 5e Character Sheet

    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.
    Last edited by Eldin89; February 26th, 2016 at 05:20.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    When I load this up the console window comes up with an error:



    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
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #3
    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.

  4. #4
    Thanks got it all figured out and it seems to be working perfectly now. Thanks again for the second set of eyes.

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    Quote Originally Posted by Eldin89 View Post
    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.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in