• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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] Evolution error

  • 2
    Posts
    2
    Years
    • Seen Nov 19, 2022
    Hello, I'm doing my first Pokémon game and I had an error when my Fartfetch'd evolves into Sirfetch'd when doing 3 critical hits during combat, the message is as follows:

    ---------------------------
    Pokémon Essentials Esp v16.3
    ---------------------------
    Excepción: NameError

    Mensaje: uninitialized constant PBEvolution::HoldItem

    Pokemon_Evolution:986:in `pbEvolutionEvolutionMoves'

    Pokemon_Evolution:980:in `pbCheckEvolutionEx'

    Pokemon_Evolution:1239:in `each'

    Pokemon_Evolution:1239:in `pbCheckEvolutionEx'

    Pokemon_Evolution:980:in `pbEvolutionEvolutionMoves'

    Evolution_Moves:369:in `pbEvolution'

    PField_Field:1053:in `pbEvolutionCheck'

    PField_Field:1035:in `each'

    PField_Field:1035:in `pbEvolutionCheck'

    PField_Field:1173

    If anyone can help me thank you very much.
     
    When it comes to evolving a Galarian Farfetch'd, I would create an attribute in the Pokemon class that records the number of critical hits dealt in battle: incrementing by 1 whenever the opponent receives a critical hit; and resetting to 0 when a battle starts. Create a function in the same class that returns true if the attribute is at least 3. Have your evolution method call the function to check the number of critical hits and confirm that the Farfetch'd is the Galarian variant (unless you want the Kantonian variant to evolve to Sirfetch'd).
     
    Last edited:
    Back
    Top