• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - 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] Fainting error in Pokémon Zero 0.10.2

I ported my project to the Pokémon Zero engine to get access to Gen 7 and 8 Abilities and moves. Everything is working as it should
but whenever an adversary Pokémon faints, it shows this error Message:

---------------------------
Pokemon Immortal X/Oblivion Y
---------------------------
[Pokémon Essentials version 17.1]

Exception: NoMethodError

Message: undefined method `fainted?' for #<PokeBattle_Battler:0x937ee70>

Nuzlocke:268:in `pbFaint'

PokeBattle_Battler:3353:in `pbProcessMoveAgainstTarget'

PokeBattle_Battler:3689:in `pbUseMove'

PokeBattle_Battler:3669:in `loop'

PokeBattle_Battler:3692:in `pbUseMove'

PokeBattle_Battler:3892:in `pbProcessTurn'

PokeBattle_Battler:3891:in `logonerr'

PokeBattle_Battler:3891:in `pbProcessTurn'

PokeBattle_Battle:2948:in `pbAttackPhase'

PokeBattle_Battle:2945:in `each'



This exception was logged in

C:\Users\Gabriel\Saved Games\Pokemon Immortal X_Oblivion Y\errorlog.txt.

I don't know what could be causing this issue, at first i thought it could be one of the abilities i've reimplemented, but i already checked every single one of them...
 
If you CTRL + Shift + F search for the function "def fainted?", do you get any search results? You should be getting one in PokeBattle_Battler. If not, then you should be able to find the "def isFainted?" function and paste this line underneath that function:
Code:
alias fainted? isFainted?
 
Back
Top