• 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.

"undefined local variable or method `opponent' for #<PokeBattle_Battler:0x90a84e0>" when attacking

Status
Not open for further replies.
53
Posts
8
Years
Whenever a pokemon attacks, this error message pops up:
Code:
---------------------------
Pokemon Wack Version
---------------------------
Exception: NameError

Message: undefined local variable or method `opponent' for #<PokeBattle_Battler:0x90a84e0>

PokeBattle_Battler:1252:in `pbEffectsOnDealingDamage'

PokeBattle_Battler:2314:in `pbProcessMoveAgainstTarget'

PokeBattle_Battler:2258:in `each'

PokeBattle_Battler:2258:in `pbProcessMoveAgainstTarget'

PokeBattle_Battler:2638:in `pbUseMove'

PokeBattle_Battler:2612:in `loop'

PokeBattle_Battler:2641:in `pbUseMove'

PokeBattle_Battler:2769:in `pbProcessTurn'

PokeBattle_Battler:2768:in `logonerr'

PokeBattle_Battler:2768:in `pbProcessTurn'



This exception was logged in 

C:\Users\Jeff\Saved Games/Pokemon Wack Version/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK   
---------------------------

The attacks work perfectly fine, but this error message pops up. Any idea what's causing it?
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
This error doesn't occur in Essentials. This error doesn't occur in the Gen 6 project. If you don't want to tell us what you've done, we can't and won't help you.

You can start by reading the error message and having a look at the code that's causing this error.
 
53
Posts
8
Years
You can go ahead and close this thread if you want. I've backpedaled through all the edits I made on the day the error occurred and nothing I did fixed it. So I just decided to get a fresh Scripts file and re add everything except a few things and now it works fine.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Just remember that, if you want people to help you in future, you'll need to provide information about your problems and what you've done.

This thread is closed because no answer is given, and it is therefore worthless.
 
Status
Not open for further replies.
Back
Top