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