• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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