• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
8
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?
     
    172
    Posts
    7
    Years
    • Seen Sep 6, 2022
    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.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • 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'.
     
    79
    Posts
    8
    Years
    • Seen Jan 12, 2024
    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.
     
    172
    Posts
    7
    Years
    • Seen Sep 6, 2022
    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
     
    79
    Posts
    8
    Years
    • Seen Jan 12, 2024
    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.
     
    172
    Posts
    7
    Years
    • Seen Sep 6, 2022
    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