DICE PACKS BUNDLE
  1. #1

    Error When Setting Category [attempt to index global 'category' (a nil value)]

    I am seeing an error in one of my development campaigns when I am trying to set records to a new category I created. This is in the latest version of FG (4.3.1). I have been unable to recreate the issue in other campaigns, so I am wondering what could cause this. Is this due to some sort of data corruption? The error pops up below when clicking and dragging certain records (like NPCs) to a new Category. The weird thing is that the category does seem to get set, it just pops this in the console:

    Code:
    [11/17/2022 12:51:11 PM] [ERROR]  Handler error: [string "CoreRPG:..cripts/masterindexitem_window.lua"]:132: attempt to index global 'category' (a nil value)
    stack traceback:
    	[string "CoreRPG:..cripts/masterindexitem_window.lua"]:132: in function <[string "CoreRPG:..cripts/masterindexitem_window.lua"]:127>
    	[C]: in function 'setCategory'
    	[string "CoreRPG:..ts/masterindexcategory_window.lua"]:15: in function 'handleDrop'
    	[string "CoreRPG:..pts/masterindexcategory_label.lua"]:33: in function <[string "CoreRPG:..pts/masterindexcategory_label.lua"]:32>

  2. #2
    From the error message, it looks like it is unable to find the category control.

    Just some random questions/thoughts to explore further:
    * Have you modified the masterindexitem windowclass at all? Or any of the window classes or scripts used in the master index implementation?
    * Do you have a filter named "category" for that list?

    Regards,
    JPG

  3. #3
    Quote Originally Posted by Moon Wizard View Post
    From the error message, it looks like it is unable to find the category control.

    Just some random questions/thoughts to explore further:
    * Have you modified the masterindexitem windowclass at all? Or any of the window classes or scripts used in the master index implementation?
    * Do you have a filter named "category" for that list?

    Regards,
    JPG
    Thanks for the reply Moon! It doesn't look like I altered any masterindexitem windowclasses at all... no filter named category, but I did just add one named "Price Category." Could that be conflicting?

  4. #4
    No idea, without having the ruleset and the example campaign to set up debug statements. Or you can do that using unpacked CoreRPG on your end too.

    The error message is just stating that the "category" variable is currently nil; which shouldn't happen because the "masterindexitem" window class specifically defines a "category" control.

    Regards,
    JPG

  5. #5
    Quote Originally Posted by Moon Wizard View Post
    No idea, without having the ruleset and the example campaign to set up debug statements. Or you can do that using unpacked CoreRPG on your end too.

    The error message is just stating that the "category" variable is currently nil; which shouldn't happen because the "masterindexitem" window class specifically defines a "category" control.

    Regards,
    JPG
    Right- well it's especially weird because it doesn't happen in ALL my campaigns, just this one I am using for development! And I checked, I am not overriding that, or the category control... I'll keep poking around though!

  6. #6
    Okay I found the bug. It's in fact happening in all rulesets.

    Here's the steps to recreate:

    1. In any campaign (say 5e) load a module that is readonly like the Monster manual
    2. Open the NPCs window
    3. Create a new category
    4. Select the category that contains the NPCs in the monster manual
    5. Click and drag to copy an NPC
    6. With this current category STILL selected, click and drag the (Copy) NPC to the new category
    7. Error pops up
    Last edited by seansps; November 18th, 2022 at 03:10.

  7. #7
    Hi, I'm also seeing the same error and I've reproduced it as follows:

    1) Create new 5e campaign without loading any extensions
    2) Don't load any modules
    3) Go to items, create a new group (use the default "Group 1")
    4) Create a new item (call is "1") and move it from "Uncategorized" to "Group 1" or vice versa - the error message appears.
    5) Quit and restart, moving the previously saved item no longer displays the error message, however, creating a new item and moving it to a different group reproduces the error.

    Please fix?

  8. #8
    Thanks guys. I was able to recreate with @seansps steps, but not others. I'll be working on a fix.

    Regards,
    JPG

  9. #9
    Quote Originally Posted by Moon Wizard View Post
    Thanks guys. I was able to recreate with @seansps steps, but not others. I'll be working on a fix.

    Regards,
    JPG
    Any update on this? Its kinda maddening.

  10. #10
    It's in the pipeline with other changes. I'll be having a beta soon with a bunch of updates.

    Regards,
    JPG

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