• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

End of File Error

Guest123123

Guest
  • 0
    Posts
    Someone received an error during a battle, and when trying to load up the game again, received an error message then too. When using her save file to try to see if I could find the cause of the error, I also got error messages when loading the game. I noticed that it was an "End of File" or "EOF" error, which I wasn't familiar with.

    I did some searching and found some mentions of it both on the archived Insurgence reddit and on Pokecommunity. According to the thread I saw on Pokecommunity, this kind of error means the file is corrupted and that the solution seems to be to delete everything in the game folder within Saved Games.

    I'm hesitant to actually suggest this because it sounds like deleting everything in the folder would mean she'd have to start a new game. Considering how far she is in the game, I'd prefer if she didn't have to start all the way over if it's possible there's another solution. So my questions are:
    1) If you delete everything in the save file, does that really mean you have to start a new game like it sounds like? Or are you still able to continue even though the save file is deleted from Saved Games? In the thread linked above, neither the OP or the person who replied specified this, just that deleting everything in the game folder in Saved Games made the errors stop.
    2) If it does mean you'd have to start a new game, is there another way to solve this that doesn't involve needing to start a new game?

    Here's the battle error, if including it would be helpful:
    Exception: TypeError
    Message: no implicit conversion from nil to integer
    Compiler:1562:in `[]'
    Compiler:1562:in `[]'
    PItem_Items:63:in `pbIsBerry?'
    PokeBattle_MoveEffects:6992:in `pbEffect'
    PokeBattle_Battler:2861:in `pbProcessMoveAgainstTarget'
    PokeBattle_Battler:2817:in `each'
    PokeBattle_Battler:2817:in `pbProcessMoveAgainstTarget'
    PokeBattle_Battler:3302:in `pbUseMove'
    PokeBattle_Battler:3282:in `loop'
    PokeBattle_Battler:3305:in `pbUseMove'
     
    for your first question, deleting the save file will delete the save and force you to start a new game, which is not ideal, according to you.
    Thankfully, you posted your error though. At one point or another, the game is trying to check if nil is a berry. And it does this by passing the item to an array. The item is nil and since nil can't be an integer for an array index, it dies horribly. Now I don't know why you have a nil item, but that's okay, we can add nil checks that will auto return false, so no crazy errors.
    Code:
    def pbIsBerry?(item)
      [COLOR="Red"]return false if !item[/COLOR]
      return $ItemData[item] && ($ItemData[item][ITEMTYPE]==5)
    end
    You may want to do this to all of the checks, as there is always the possibility that there are other nil items.

    This is a band-aid though, you'll need a more permanent fix, and I don't have one.
     
    for your first question, deleting the save file will delete the save and force you to start a new game, which is not ideal, according to you.
    Thankfully, you posted your error though. At one point or another, the game is trying to check if nil is a berry. And it does this by passing the item to an array. The item is nil and since nil can't be an integer for an array index, it dies horribly. Now I don't know why you have a nil item, but that's okay, we can add nil checks that will auto return false, so no crazy errors.
    Code:
    def pbIsBerry?(item)
      [COLOR="Red"]return false if !item[/COLOR]
      return $ItemData[item] && ($ItemData[item][ITEMTYPE]==5)
    end
    You may want to do this to all of the checks, as there is always the possibility that there are other nil items.

    This is a band-aid though, you'll need a more permanent fix, and I don't have one.
    When looking at the errorlog, I had noticed the game was trying to check for a berry, though I hadn't known nil was referring to an item. Since the trainer she was facing has a Mienshao holding a Sitrus Berry, I asked if the Sitrus Berry was being activated when she was battling the trainer, but she OHKO'd the Mienshao with Psychic and no berry was used or activated during the battle.

    My next thought was to check item 63 in items.txt due to the PItems_Items:63 line, but I found out that's Shoal Salt, which I haven't used or made obtainable in any context in the game. Unfortunately, I also don't know why there's a nil item.

    I did end up starting a new file since I was beginning to think it was the only solution. I reconstructed her team and PC based on the provided details and made it up to where she was so that she didn't need to play from the beginning again. She had no issues battling the trainer again.

    Thank you for the script to suppress nil items. I'll be using this to prevent these kind of incidents in the future. I've never had a problem with any of the held items the trainer uses, which makes me wonder if either the error comes from a held item she was using, or if it was caused by a very specific set of battle circumstances regarding how a held item reacts to a move or ability that just hasn't happened or been created by anyone else.
     
    Back
    Top