• 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] This error appears when using this move, and similar "b" related errors appear when using other moves.

  • 428
    Posts
    5
    Years
    [Pokémon Essentials version 19.1]
    [Generation 8 Project v1.1.0]
    [v19.1 Hotfixes 1.0.7]

    Exception: NameError
    Message: undefined local variable or method `b' for #<PokeBattle_Move_02D>

    Backtrace:
    163:Move_Usage_Calculations:526:in `pbAdditionalEffectChance'
    155:Battler_UseMove:722:in `block in pbProcessMoveHit'
    155:Battler_UseMove:720:in `each'
    155:Battler_UseMove:720:in `pbProcessMoveHit'
    155:Battler_UseMove:433:in `block in pbUseMove'
    155:Battler_UseMove:431:in `each'
    155:Battler_UseMove:431:in `pbUseMove'
    155:Battler_UseMove:60:in `block in pbProcessTurn'
    012:PBDebug:6:in `logonerr'
    155:Battler_UseMove:59:in `pbProcessTurn'
     
    [Pokémon Essentials version 19.1]
    [Generation 8 Project v1.1.0]
    [v19.1 Hotfixes 1.0.7]
    I saw Golisopod's answer on the right thread. Post your code here (inside SPOILER and CODE please) and I'll help you if you haven't found the solution.
     
    Here you go

    def pbAdditionalEffectChance(user,target,effectChance=0)
    return 0 if target.hasActiveAbility?(:SHIELDDUST) && [email protected]
    ret = (effectChance>0) ? effectChance : @addlEffect
    if Settings::MECHANICS_GENERATION >= 6 || @function != "0A4" # Secret Power
    ret = 100 if user.hasActiveAbility?(:SERENEGRACE)
    end
    ret = 100 if Effectiveness.super_effective?(target.damageState.typeMod)
    return ret
    ret = 100 if $DEBUG && Input.press?(Input::CTRL)
    return ret
    end

    def pbFlinchChance(user,target)
    ret = 100 if Effectiveness.super_effective?(target.damageState.typeMod)
    else
    ret = 0
    return ret
    end
    end
     
    Last edited:
    Back
    Top