• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!

No method error during battle

Desperado

Novice
Member
Joined
Jan 22, 2024
Posts
28
Here's the error message:
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: NoMethodError
Message: undefined method `battler' for #<Battle::Battler>

Backtrace:
AI_MoveEffects_MoveAttributes:118:in `block (2 levels) in <main>'
AI_MoveEffects_MoveAttributes:117:in `each'
AI_MoveEffects_MoveAttributes:117:in `block in <main>'
Event_Handlers:139:in `trigger'
Battle_AI:111:in `apply_move_effect_against_target_score'
[Deluxe Battle Kit] [002] Misc Utilities.rb:529:in `pbGetMoveScoreAgainstTarget'
AI_ChooseMove:250:in `block in pbGetMoveScore'
AI_ChooseMove:247:in `each'
AI_ChooseMove:247:in `pbGetMoveScore'
[Deluxe Battle Kit] [003] Command Menu Refactor.rb:522:in `block (3 levels) in pbGetMoveScores'

While testing in debug mode the console shows:
Exception `NoMethodError at Section214:118 - undefined method `battler' for #<Battle::Battler>
This message appears in the console each time the error message pops up.

Here's the scenario:
2v2 trainer battle. Opponent is using Houndoom and Stantler which are both level 30. I don't think the player's Pokémon matters since I've been trying a few different combinations and the same message appears. I think the issue is that the game is trying to prioritize which move and/or target to use the move on, but the game ties somehow. I've also tried this in a very similar setup where the opponent trainer uses Houndoom alongside Girafarig and the same error occurs.

The moves used by all four participants in the battle are able to use their moves without issue. The error message pops up twice, which I think is once for the Houndoom and once for the Stantler since they're tied and both produce the error message. Once either of the opponent's Pokémon are knocked out the error message no longer pops up. Every turn that starts where both the Houndoom and Stantler are still in battle the error message pops up twice at the start of resolving the chosen actions for that turn.

The game doesn't crash after these pop-ups. If I click OK to get rid of the window and continue playing through the battle it continues normally.

All the Pokémon involved in this scenario have moves and abilities that resolve without issue. I don't think this is caused by one of my custom changes. Other trainer variants that don't use Houndoom alongside either Girafarig or Stantler don't cause any error message, so for now my solution to this strange error is to avoid having trainers use these combinations.
 
Last edited:
Back
Top