• 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!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • 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] New ability causing an error

  • 32
    Posts
    5
    Years
    • Seen Apr 17, 2020
    Hi there, I created a new ability which acts kinda like storm drain but for steel moves and when hit by one, instead of getting the SPATK, raised, the ATK is raised. I simulated a battle but when I get hit I get this error

    ---------------------------
    Pokemon Neutron
    ---------------------------
    [Pokémon Essentials version 17.2]

    Exception: NameError

    Message: uninitialized constant PBStats::ATK

    PokeBattle_Move:312:in `pbTypeImmunityByAbility'

    PokeBattle_Move:445:in `pbTypeModMessages'

    PokeBattle_Move:1050:in `pbCalcDamage'

    PokeBattle_Move:1281:in `pbEffect'

    PokeBattle_MoveEffects:1835:in `pbEffect'

    PokeBattle_Battler:3280:in `pbProcessMoveAgainstTarget'

    PokeBattle_Battler:3236:in `each'

    PokeBattle_Battler:3236:in `pbProcessMoveAgainstTarget'

    PokeBattle_Battler:3719:in `pbUseMove'

    PokeBattle_Battler:3699:in `loop'



    This exception was logged in

    C:\Users\lenovo\Saved Games\Pokemon Neutron\errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------
    It is because in the script I have modified this :
    if opponent.pbCanIncreaseStatStage?(PBStats::SPATK,opponent)
    opponent.pbIncreaseStatWithCause(PBStats::SPATK,1,opponent,PBAbilities.getName(opponent.ability))
    into this :
    if opponent.pbCanIncreaseStatStage?(PBStats::ATK,opponent)
    opponent.pbIncreaseStatWithCause(PBStats::ATK,1,opponent,PBAbilities.getName(opponent.ability))
     
    Back
    Top