• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Error] New Bag Screen

#Not Important

All hail the wishmaker
  • 910
    Posts
    5
    Years
    So, I made a 9th bag screen, and when I obtain the Item that is meant to go there, well...
    It doesn't...
    So here Is the script for the 9th bag screen:
    Code:
    #===============================================================================
    # * The names of each pocket of the Bag. Leave the first entry blank.
    # * The maximum number of slots per pocket (-1 means infinite number). Ignore
    #      the first number (0).
    # * The maximum number of items each slot in the Bag can hold.
    # * Whether each pocket in turn auto-sorts itself by item ID number. Ignore the
    #      first entry (the 0).
    #===============================================================================
    def pbPocketNames; return ["",
       _INTL("Items"),
       _INTL("Medicine"),
       _INTL("Poké Balls"),
       _INTL("TMs & HMs"),
       _INTL("Berries"),
       _INTL("Mail"),
       _INTL("Battle Items"),
       _INTL("Key Items"),
       _INTL("Zodiac Gems")
    ]; end
    MAXPOCKETSIZE  = [0,-1,-1,-1,-1,-1,-1,-1,-1]
    BAGMAXPERSLOT  = 999
    POCKETAUTOSORT = [0,true,true,true,true,true,true,true,true,true]
    And this is the error message that shows up in debug mode:
    Code:
    ---------------------------
    Pokemon Metal Might
    ---------------------------
    [Pokémon Essentials version 17.2]
    
    Exception: NoMethodError
    
    Message: undefined method `length' for nil:NilClass
    
    PItem_Bag:147:in `pbStoreItem'
    
    Debug_Menu:390:in `pbDebugMenuActions'
    
    Debug_Menu:382:in `pbListScreenBlock'
    
    Editor_Listers:91:in `loop'
    
    Editor_Listers:116:in `pbListScreenBlock'
    
    Debug_Menu:382:in `pbDebugMenuActions'
    
    Debug_Menu:744:in `pbDebugMenu'
    
    Debug_Menu:710:in `loop'
    
    Debug_Menu:746:in `pbDebugMenu'
    
    ModularMenu:462
    
    
    
    This exception was logged in 
    
    C:\Users\RPG maker XP 2\Saved Games\Pokemon Metal Might\errorlog.txt.
    
    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK   
    ---------------------------
     
    This might not be helpful in this situation but I'd honestly ditch the Mail Pocket for the Zodiac Crystal one.
     
    Well I mean, one very obvious issue is you have 9 pockets (not counting the blank one), and you've only defined a size for 8 of them...
     
    Back
    Top