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

[Error] Error when an enemy trainer uses an Item.

  • 1
    Posts
    103
    Days
    • Seen Apr 12, 2025
    Hi, could someone help me? I get this error when an enemy trainer, for example Brock, uses an item....

    Mensaje: undefined local variable or method `pokemon' for #<PokeBattle_Battle:0x17246e20>
    102:PokeBattle_Battle:1872:in `pbEnemyUseItem'
    102:PokeBattle_Battle:3445:in `pbAttackPhase'
    102:PokeBattle_Battle:3441:in `each'
    102:PokeBattle_Battle:3441:in `pbAttackPhase'
    102:PokeBattle_Battle:3103:in `pbStartBattleCore'
    054:PBDebug:4:in `logonerr'
    102:PokeBattle_Battle:3102:in `pbStartBattleCore'
    102:PokeBattle_Battle:3088:in `loop'
    102:PokeBattle_Battle:3088:in `pbStartBattleCore'
    102:PokeBattle_Battle:2882:in `pbStartBattle'



    I have this in trainers.txt :

    #-------------------
    LEADER_Brock
    Brock
    2,FULLRESTORE,FULLRESTORE
    GEODUDE,12,,DEFENSECURL,HEADSMASH,ROCKPOLISH,ROCKTHROW,0,M,,,,20
    ONIX,14,SITRUSBERRY,HEADSMASH,ROCKTHROW,TERABLAST,ROCKTOMB,0,M,,shiny,,20,,Rocky,,19
    #-------------------
     
    Which version of essentials are you using? There's any plugin in it? You should always put this when wanting something here so people can actually help you out
     
    Back
    Top