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

Opposing trainer item/ exp when catching Pokémon issue

  • 87
    Posts
    9
    Years
    Hi!
    When I was trying to playtest my game, I came across two issues:
    1. When I changed the setting in the settings menu to allow you to gain exp when you catch a wild Pokémon, this error appears:
    Code:
    Exception: NameError
    Message: undefined local variable or method `pbGainExp' for #<PokeBattle_Battle:0xdae6238>
    PokeBattle_Battle:229:in `pbThrowPokeBall_ebs'
    EliteBattle_Battle:365:in `pbThrowPokeBall'
    PItem_ItemEffects:1677
    PItem_ItemEffects:1676:in `call'
    Event:150:in `trigger'
    PItem_Items:256:in `triggerUseInBattle'
    PokeBattle_Battle:1583:in `pbRegisterItem'
    PokeBattle_Battle:2756:in `pbCommandPhase_ebs'
    PokeBattle_Battle:2711:in `loop'
    PokeBattle_Battle:2801:in `pbCommandPhase_ebs'

    2.When your opponent tries to use items in battle, this error appears:
    Code:
    Exception: NoMethodError
    Message: undefined method `>=' for nil:NilClass
    PokeBattle_Battle:1576:in `pbRegisterItem'
    PokeBattle_AI:3767:in `pbEnemyShouldUseItem?'
    PokeBattle_AI:4056:in `pbDefaultChooseEnemyCommand'
    PokeBattle_Scene:2747:in `pbChooseEnemyCommand'
    PokeBattle_Battle:2705:in `pbCommandPhase_ebs'
    PokeBattle_Battle:2700:in `each'
    PokeBattle_Battle:2700:in `pbCommandPhase_ebs'
    EliteBattle_Battle:292:in `pbCommandPhase'
    EliteBattle_Battle:222:in `pbStartBattleCore'
    EliteBattle_Battle:221:in `logonerr'
    Is there any way that I can fix these issues?

    Thanks for the help!
     
    What version of Essentials are you on? A clean v16.2 does not have this error (I tested) and furthermore your line numbers are off. Your first error message is on line 229, but the method that it refers to pbGainEXP in pbThrowPokeBall (aliased by EBS clearly, but probably not related?) is on line 151. Meanwhile, though I can't track down the original line, line 1576 is
    Code:
    battler.pbRecoverHP(battler.totalhp-battler.hp,true)
    which doesn't have the method that is involved, a >=.

    Did you modify it in any way beside Luka's EBS? Information is how we can solve these problems.
     
    Back
    Top