• 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!
  • 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 holding quick claw

  • 41
    Posts
    4
    Years
    • Seen Sep 19, 2023
    I gave an opponent a quick claw. When quick claw activates it gives me the following error

    Exception: NameError
    Message: undefined local variable or method `b' for nil:NilClass
    Backtrace:
    BattleHandlers_Items:400


    I tracked down line 400 in BattleHandlers_Items and found this.


    BattleHandlers::PriorityBracketChangeItem.add(:QUICKCLAW,
    proc { |item,battler,subPri,battle|
    next 1 if subPri<1 && battle.pbRandom(100)<20 && (!battler.effects[PBEffects::PriorityAbility] && b.hasActiveAbility?(:QUICKDRAW))

    Any idea how to fix this error? It doesn't actually crash the game but it does give that annoying pop-up.
     
    Replace "b" with "battler" in this code:
    Code:
     next 1 if subPri<1 && battle.pbRandom(100)<20 && (!battler.effects[PBEffects::PriorityAbility] && b.hasActiveAbility?(:QUICKDRAW))
     
    Back
    Top