View Single Post
  #32    
Old February 10th, 2012 (11:01 PM).
RaulCortez's Avatar
RaulCortez RaulCortez is offline
Maybe active...sometimes?
     
    Join Date: Sep 2011
    Location: Panamá, Panamá
    Age: 27
    Gender: Male
    Nature: Sassy
    Posts: 97
    Hey everyone!

    I'm experiencing an error everytime i try to give a Key Item to the player. I don't really know what it is, i've tried different things but nothing seems to fix it. Here's the error:

    Code:
    Exception: RuntimeError
    Message: Script error within event 7, map 44 (GREENLEAF CAFE):
    Exception: NoMethodError
    Message: Section094:785:in `pbStoreItem'undefined method `length' for nil:NilClass
    ***Full script:
    Kernel.pbReceiveItem(PBItems::TOWNMAP)
    Interpreter:243:in `pbExecuteScript'
    PokemonField:1847:in `pbReceiveItem'
    (eval):1:in `pbExecuteScript'
    Interpreter:787:in `eval'
    Interpreter:243:in `pbExecuteScript'
    Interpreter:787:in `command_111'
    Interpreter:319:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    
    Interpreter:275:in `pbExecuteScript'
    Interpreter:787:in `command_111'
    Interpreter:319:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Scene_Map:103:in `update'
    Scene_Map:101:in `loop'
    Scene_Map:114:in `update'
    Scene_Map:68:in `main'
    I had a slight idea that it may be related to PokemonBag, on line 785 (That's the place where i found PbStoreItem, at least)

    But i've checked there and nothing seems out of place, here's what it says:

    Code:
    def pbStoreItem(item,qty=1)
        pocket=pbGetPocket(item)
        maxsize=maxPocketSize(pocket)
        [email protected][pocket].length+1 if maxsize<0
        return ItemStorageHelper.pbStoreItem(
           @pockets[pocket],maxsize,BAGMAXPERSLOT,item,qty)
       end
    end
    Any idea of how to fix this?

    Thanks!
    __________________

    Name: Bellefleur
    Adopt one yourself! @Pokémon Orphanage
    Reply With Quote