• 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!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Scripting Question] Problem with pokemon that can evolve while holding items.

Scraps The Man

Crystal Collector
  • 33
    Posts
    4
    Years
    • Seen Jun 19, 2024
    Hey, so I am making a pokemon game with some pokemon that can have some crazy branching evolution paths. Nothing too crazy is happening, but when I was testing out a pokemon that could evolve with 5 different held items, a new problem arose that has broken all pokemon that evolve while holding items as well. I have no idea if it is because I used a rare candy on them, and that caused some script errors, but I am not too good at coding yet and have no idea really how to fix this.

    ---------------------------
    CODE:
    ---------------------------
    Pokemon Essentials
    ---------------------------
    [Pokémon Essentials version 17.2]

    Exception: NoMethodError

    Message: undefined method `>' for nil:NilClass

    Pokemon_Evolution:967:in `pbCheckEvolutionEx'

    Pokemon_Evolution:965:in `each'

    Pokemon_Evolution:965:in `pbCheckEvolutionEx'

    Pokemon_Evolution:976:in `pbCheckEvolution'

    PItem_Items:315:in `pbChangeLevel'

    PItem_ItemEffects:818

    PItem_ItemEffects:813:in `call'

    EventHandlers:150:in `trigger'

    PItem_Items:228:in `triggerUseOnPokemon'

    PItem_Items:634:in `pbUseItem'
    --------------------------

    (I could attribute this to an evolution method that I added into my scripts ("hatred"), but it still seemed to break even when I took it out, so that is probably not the reason)
    (I will keep trying to just backtrack in my code and see if I just need to take out something that I added in a script, but just in case it is not the case, I thought I would post here)
     
    Nevermind! I have figured it out! Somehow I must have added something that should not have been added to my evolutions script and that threw everything out of whack! Sorry about posting this only to have it be immediately fixed!
     
    Back
    Top