• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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
  • 905
    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