• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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 message + attack repeating with new ability.

  • 35
    Posts
    4
    Years
    • Seen Mar 19, 2025
    Trying to make a new ability that's basically Life Orb, keep getting an error when hit by a move that is followed by the other Pokémon using the move again.

    [Pokémon Essentials version 20.1] [v20.1 Hotfixes 1.0.7]

    Exception: NameError Message: undefined local variable or method `hitBattler' for nil:NilClass

    Backtrace:

    215:Battle_AbilityEffects:2265:in `block in <main>'

    035:Event_Handlers:227:in `trigger'

    215:Battle_AbilityEffects:233:in

    `triggerAfterMoveUseFromTarget'

    169:Battler_UseMoveTriggerEffects:196:in `block in

    pbEffectsAfterMove2'

    169:Battler_UseMoveTriggerEffects:193:in `each'

    169:Battler_UseMoveTriggerEffects:193:in `pbEffectsAfterMove2'

    169:Battler_UseMoveTriggerEffects:158:in `pbEffectsAfterMove'

    166:Battler_UseMove:503:in `pbUseMove'

    166:Battler_UseMove:52:in `block in pbProcessTurn'

    012:PBDebug:6:in `logonerr'

    And the code is:

    Battle::AbilityEffects::AfterMoveUseFromTarget.add(:UNSTABLECORE,

    proc { |ability, battler, battle|

    next if !hitBattler

    battle.pbShowAbilitySplash(battler)

    battle.scene.pbDamageAnimation(battler)

    battler.pbReduceHP(battler.totalhp / 8, false)
    battle.pbDisplay(_INTL("{1} was hurt by their {2}!",
    battler.pbThis))

    battle.pbHideAbilitySplash(battler)

    battler.pbItemHPHealCheck
    }

    )
     
    Back
    Top