• 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 when battling Pokemon

  • 79
    Posts
    9
    Years
    • Seen Jan 12, 2024
    For some reason, when battling a pokemon, every time either one uses a move I get this error. At first I thought this was because of using pokemon I added to the game (gen 6-7 and some new pokemon) but it happens for every pokemon. It also doesn't appear to be because of moves I've added, because it happens with existing moves I haven't edited at all.

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

    Exception: ArgumentError

    Message: bad value for range

    PokeBattle_Battler:2956:in `pbProcessMoveAgainstTarget'

    PokeBattle_Battler:3432:in `pbUseMove'

    PokeBattle_Battler:3412:in `loop'

    PokeBattle_Battler:3435:in `pbUseMove'

    PokeBattle_Battler:3633:in `pbProcessTurn'

    PokeBattle_Battler:3632:in `logonerr'

    PokeBattle_Battler:3632:in `pbProcessTurn'

    PokeBattle_Battle:2829:in `pbAttackPhase'

    PokeBattle_Battle:2826:in `each'

    PokeBattle_Battle:2826:in `pbAttackPhase'



    This exception was logged in

    C:\Users\totte\Saved Games\Pokemon Essentials\errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------

    What exactly is causing this?
     
    For some reason, when battling a pokemon, every time either one uses a move I get this error. At first I thought this was because of using pokemon I added to the game (gen 6-7 and some new pokemon) but it happens for every pokemon. It also doesn't appear to be because of moves I've added, because it happens with existing moves I haven't edited at all.

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

    Exception: ArgumentError

    Message: bad value for range

    PokeBattle_Battler:2956:in `pbProcessMoveAgainstTarget'

    PokeBattle_Battler:3432:in `pbUseMove'

    PokeBattle_Battler:3412:in `loop'

    PokeBattle_Battler:3435:in `pbUseMove'

    PokeBattle_Battler:3633:in `pbProcessTurn'

    PokeBattle_Battler:3632:in `logonerr'

    PokeBattle_Battler:3632:in `pbProcessTurn'

    PokeBattle_Battle:2829:in `pbAttackPhase'

    PokeBattle_Battle:2826:in `each'

    PokeBattle_Battle:2826:in `pbAttackPhase'



    This exception was logged in

    C:\Users\totte\Saved Games\Pokemon Essentials\errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------

    What exactly is causing this?
    It's probably because of edits you made to the moves. Even if it was from attacks you didn't touch, the attack codes will still run the entire line of code when using an attack. You should always only make edits one at a time and not move on until they've been tested and work, so hopefully you remember where and what you changed so you can go back and make corrections.
     
    It's probably because of edits you made to the moves. Even if it was from attacks you didn't touch, the attack codes will still run the entire line of code when using an attack. You should always only make edits one at a time and not move on until they've been tested and work, so hopefully you remember where and what you changed so you can go back and make corrections.

    And

    Turn back when you edited or add something in 'pbProcessMoveAgainstTarget'.
     
    And

    Turn back when you edited or add something in 'pbProcessMoveAgainstTarget'.

    I looked through every instance that mentions 'pbProcessMoveAgainstTarget' and I haven't touched anything in there. I even compared mine with the script of an unedited essentials script and they are identical, so I'm not sure why it's mentioning that.
     
    I looked through every instance that mentions 'pbProcessMoveAgainstTarget' and I haven't touched anything in there. I even compared mine with the script of an unedited essentials script and they are identical, so I'm not sure why it's mentioning that.
    then it would be any of the moves you edited. like I said it runs the entire script for that area so what you changed may be causing an error when it interacts with pbprocessmoveagainsttarget
     
    then it would be any of the moves you edited. like I said it runs the entire script for that area so what you changed may be causing an error when it interacts with pbprocessmoveagainsttarget

    It's weird, because I tried replacing the moves.txt of a clean copy of essentials with the one I'd been using, and I didn't get any errors. So it looks like it isn't the moves, but some script I edited. Thankfully I hadn't added too many new scripts so I can add them until I find what was wrong.
     
    It's weird, because I tried replacing the moves.txt of a clean copy of essentials with the one I'd been using, and I didn't get any errors. So it looks like it isn't the moves, but some script I edited. Thankfully I hadn't added too many new scripts so I can add them until I find what was wrong.

    Yeah if there was an error in your pbs files then it would show when you tried to start up the game. The error you described is definitely from a script that's been edited
     
    Back
    Top