The PokéCommunity Forums Fan Games Game Development Pokémon Essentials
Error Error when battling Pokemon

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Reply
 
Thread Tools
  #1    
Old October 12th, 2018 (2:17 PM).
Tommaniacal Tommaniacal is offline
     
    Join Date: Apr 2016
    Posts: 29
    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?
    Reply With Quote
      #2    
    Old October 12th, 2018 (4:15 PM).
    NewAgeSteel NewAgeSteel is online now
       
      Join Date: Jan 2017
      Gender: Male
      Posts: 103
      Quote:
      Originally Posted by Tommaniacal View Post
      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.
      Reply With Quote
        #3    
      Old October 12th, 2018 (7:41 PM).
      WolfPP's Avatar
      WolfPP WolfPP is offline
         
        Join Date: Aug 2018
        Location: Brazil
        Gender: Male
        Nature: Jolly
        Posts: 154
        Quote:
        Originally Posted by NewAgeSteel View Post
        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'.
        Reply With Quote
          #4    
        Old October 13th, 2018 (1:11 PM).
        Tommaniacal Tommaniacal is offline
           
          Join Date: Apr 2016
          Posts: 29
          Quote:
          Originally Posted by WolfPP View Post
          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.
          Reply With Quote
            #5    
          Old October 13th, 2018 (1:35 PM).
          NewAgeSteel NewAgeSteel is online now
             
            Join Date: Jan 2017
            Gender: Male
            Posts: 103
            Quote:
            Originally Posted by Tommaniacal View Post
            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
            Reply With Quote
              #6    
            Old October 13th, 2018 (2:13 PM).
            Tommaniacal Tommaniacal is offline
               
              Join Date: Apr 2016
              Posts: 29
              Quote:
              Originally Posted by NewAgeSteel View Post
              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.
              Reply With Quote
                #7    
              Old October 13th, 2018 (2:43 PM).
              NewAgeSteel NewAgeSteel is online now
                 
                Join Date: Jan 2017
                Gender: Male
                Posts: 103
                Quote:
                Originally Posted by Tommaniacal View Post
                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
                Reply With Quote
                Reply

                Quick Reply

                Join the conversation!

                Create an account to post a reply in this thread, participate in other discussions, and more!

                Create a PokéCommunity Account
                Thread Tools

                Posting Rules
                You may not post new threads
                You may not post replies
                You may not post attachments
                You may not edit your posts

                BB code is On
                Smilies are On
                [IMG] code is On
                HTML code is Off

                Forum Jump


                All times are GMT -8. The time now is 1:39 PM.