• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
1
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.
     
    188
    Posts
    9
    Years
    • Seen Jan 21, 2024
    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