• 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!
  • 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] MegaEvolutions Error: Exception: TypeError Message: cannot convert true into Integer

  • 4
    Posts
    3
    Years
    • Seen Mar 2, 2025
    Hello,

    I've been recently adding a new Script to my game in the MegaEvolutions section, and I also added a PokemonForms.txt to my game's PBS. I also edited the PokeBattle_Battlers section (I think it was) accordingly. I'm using Pokémon Essentials 16.2 version. The issue is that after a battle in which I mega evolved a Pokémon, and with two Pokémons with Mega Stones in my team, when I check my Pokémon team in Menu after that battle and I arrive to the other Pokémon that holds a Mega Stone of the two, but that is the one I didn't mega evolved, this error message appears interrupting the game:

    Exception: TypeError
    Message: cannot convert true into Integer
    PSystem_Utilities:1461:in `sprintf'
    PSystem_Utilities:1461:in `pbCryFile'
    PSystem_Utilities:1444:in `pbPlayCry'
    PScreen_Summary:945:in `pbScene'
    PScreen_Summary:907:in `loop'
    PScreen_Summary:983:in `pbScene'
    PScreen_Summary:997:in `pbStartScreen'
    PScreen_Party:790:in `pbSummary'
    PScreen_Party:1905:in `pbPokemonScreen'
    PScreen_Party:1816:in `loop'

    It is like I can't mega evolve two Pokémons or like If I have more than one Pokémon with a Mgea Stone, the game shows up an error pop-up message.
    I would be very thankful If someone can help me out with this and knows why is this error occurring or knows what happens and how to fix it.

    Thanks in advance.
     
    Last edited:
    Okay, thanks, it works. Now the issue is that when they mega evolve they don't go back to their original form after battle and remain in their mega evolved form. Any feedback on what kind of script could fix that?
     
    Okay, thanks, it works. Now the issue is that when they mega evolve they don't go back to their original form after battle and remain in their mega evolved form. Any feedback on what kind of script could fix that?
    This was fixed on v17:
    Pokémon now properly revert from Mega/Primal forms after battles.
    I guess that adding
    Code:
    "getUnmegaForm"=>proc{|pokemon|
       next 0
    },
    Before every `"getMegaForm"=>proc{|pokemon|` fix this issue.
     
    Back
    Top