• 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] Another no method error (Please help!)

A30502355

Newbie
  • 6
    Posts
    7
    Years
    • Seen Mar 20, 2024
    ---------------------------
    Pokemon Essentials
    ---------------------------
    Exception: NoMethodError

    Message: undefined method `>' for nil:NilClass

    PScreen_Party:353:in `refresh'

    PScreen_Party:282:in `selected='

    PScreen_Party:261:in `initialize'

    PScreen_Party:517:in `new'

    PScreen_Party:517:in `pbStartScene'

    PScreen_Party:515:in `each'

    PScreen_Party:515:in `pbStartScene'

    PScreen_Party:1815:in `pbPokemonScreen'

    PScreen_PauseMenu:174:in `pbStartPokemonMenu'

    PScreen_PauseMenu:173:in `pbFadeOutIn'



    This exception was logged in

    *****

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------

    This happens every time I open up the party menu after a battle (the outcome of the battle doesn't matter.)
     
    For a notice I just really want to know what went EXACTLY with the code.
    I don't need a real solution. Since it's impossible.
     
    Well, looking at line 353 of PScreen_Party, the last line in the stacktrace, I find @itemsprite.visible=(@pokemon.item>0)
    The error says it tried to do a > on nil. Since the only thing with a > is the item of the pokemon object, for some reason the item variable is being get set to nil.

    You said it happens after battles so check your battle end code for a .item= or a .setItem . Places to look for include def pbEndOfBattle and any Events.onEndBattle as a start.

    It's possible that you have code that sets the itemInitial variable of the pokemon to nil, since the end of a battle restores the item the pokemon was holding to the itemInitial.

    By the way, you should mention the version you are working with. I had to go back to v16.2 to get the right line.
     
    Back
    Top