Game makes the saving sound but it deletes the save

Topic.

I seriously can't understand why is my game making this. In 99% of the computers where people run the game they have no issues, yet some people get an issue in which they run the game, play it for a while and when they try to save over an old save it makes the game saved sound but the save is deleted. Any ideas?
Are you sure it's the saving sound it makes, and not the buzzer sound?

If the game is not able to save for some reason, it makes the buzzer sound and deletes the save file, which it thinks is corrupt because it couldn't save successfully.

Is it always over an older save? Or is it when they start a new game and try to save for the first time?

Is it when they actually save, or just when they go to save, as the Save Game window is trying to open? That could be a different issue.

I'd ask them where they have the game installed. If it's in Program Files, there are likely to be permission issues. If it's to a folder that does automatic online syncing (cloud, dropbox, etc), it could be trying to save in the middle of syncing (also a good way to corrupt your files). My suggestion is to install to a new folder on the C drive - not inside any folders that Windows "owns" or creates (including My Documents).
None of that.

I'm 100% sure it's the actual saving sound.

It's irrelevant where the folder is.

It can be the first save or the 100th, it happens at random times when you try to save regardless if it's a new save or saving over something. Once you get the error, you need to shut down the game and re-open to be able to save again. If you try to save over and if your saves IT DELETES the saves.
What scripts do you have?
If some people can play the game through without problems and other people have problems saving, then there is a difference between what those people are doing. And you need to systematically look for that difference.
Don't assume something cannot be the cause just because it works on your computer - it might be a combination of several things that went wrong on those other computers.

1) please ask them for the full filepath of where they stored the game together with the windows version they're running.
Then post that info here for us to cross-check. There are half a dozen possibilities where that can have caused problems.

2) please ask them how far into the game they played before the problem comes up and what they've done in that time.
It is possible that such an error happens if some functions or scripts are triggered in the wrong sequence - which can only be found by retracing all steps.

3) please ask them to start a new game and try to save that on the first map.
If that works, it points out to a problem like described in 2 - if the new game can't be saved as well it's more likely something in the 1 option above.
By default, save file can not be deleted through the game (only overwrite). It must have something to do with some scripts. Do you use any save engine script?
I had this happen when I installed an anti-lag script and tried to play a save game made before it was installed. Those old saves would never save anymore and delete themselves, because of the new script.

Make sure all players have the most current version of the game with all scripts installed.

Make sure they are not using saves from before you installed scripts

Check the file directory. That is not irrevelent, some directories windows will refuse to let you save under.
I'm using the following scripts:





I've tested all the above suggestions. Progress is irrelevant, the crash is absolutely random. The crash doesn't happen right away, they're able to play and save for a while until at some point, the save no longer works and it will delete older saves if you try to save over them.

They're playing in the latest version with fresh saves.

I can post the latest version of my game if it would help someone help me fix this problem which I've been tearing my hair off trying to fix.
You ONLY have 3 scripts in addition to the core scripts?

Does it happen on particular maps?
No, those are the three pertaining saving. I don't think it's on particular maps? But I can't give you a straight answer. I believe not tho.

One guy once said something curious which was, how long would it take to for him not to be able to save was not sure, but if he started the game with cheat engine and sped up the game x5, it would 100% not let him save even once. Like, it happens right off the bat.
then give a screenshot that shows us all your added scripts and give links (not reposts) to the website where you got the more important scripts from.

also, using a cheat engine and speeding up the game can be a good cause for this, because a lot of cheat engines open the save files to check them and that can cause a problem with the save function. so ask them to play without cheat engine to test this.
No, those are the three pertaining saving.

It is likely NOT a script that has anything to do with saving. There is a particular one I have in mind that often causes saves to fail. I just can't remember the name of it, but if you show us ALL your scripts (just open the Script editor and take a screenshot - assuming you've got them named properly) I might recognize it.
Pardon me in advance, the delete save IS actually exist in the default game.
According to the default script, the save game WILL be deleted if the saving process is failed.

Try to put this script, and then try to reproduce the same error
Code:
class << DataManager
  def save_game(index)
    begin
      save_game_without_rescue(index)
    rescue
      contents = make_save_contents
      pointer = nil
      begin
        contents.each_value do |content|
          pointer = content
          Marshal.dump(content)
        end
      rescue
        msgbox "Fault at #{content.class}"
        return false
      end
      return false
    end
  end
end
It won't solve the problem, but at least will give you a pointer on which script that may cause the save fault.
then give a screenshot that shows us all your added scripts and give links (not reposts) to the website where you got the more important scripts from.

also, using a cheat engine and speeding up the game can be a good cause for this, because a lot of cheat engines open the save files to check them and that can cause a problem with the save function. so ask them to play without cheat engine to test this.

No, not "a" cheat engine. THE cheat engine, as in, cheat engine the program. I use it to speed up the process sometimes, not edit files.

zUpfDWK.png

u2APmAs.png



Pardon me in advance, the delete save IS actually exist in the default game.
According to the default script, the save game WILL be deleted if the saving process is failed.

Try to put this script, and then try to reproduce the same error
Code:
class << DataManager
  def save_game(index)
    begin
      save_game_without_rescue(index)
    rescue
      contents = make_save_contents
      pointer = nil
      begin
        contents.each_value do |content|
          pointer = content
          Marshal.dump(content)
        end
      rescue
        msgbox "Fault at #{content.class}"
        return false
      end
      return false
    end
  end
end
It won't solve the problem, but at least will give you a pointer on which script that may cause the save fault.

Appreciated, will do.
None of those scripts rings a bell as the one I'm familiar with that causes the game to not save. However, a lot of those are new to me.

Do you have any events on any maps that show a picture or an animation or a balloon in a looping process?
I don't think so... I don't use "loop" much to begin with. Any way I can check this more thoroughly?

My scripter says it's probably a permission issue that place the game on the C drive. I'm inclined to agree.
mmm ... that's pretty much what I said in my first reply and you rejected my answer, saying the location is irrelevant.

I'd ask them where they have the game installed. If it's in Program Files, there are likely to be permission issues... My suggestion is to install to a new folder on the C drive - not inside any folders that Windows "owns" or creates (including My Documents).

We HAVE run into this sort of thing before and do know a little bit about what might cause such issues. I was not the only one who mentioned the folder location. I also suspect some of your other answers were made a little too quickly, without actually checking things. If we ask you if a certain thing is happening, and you say no, but it actually IS happening, you're kinda making it hard for us to help you.

You should at least follow up on suggestions made before you dismiss them.

Where do these people have their games installed?
Do you have any kind of script that changes the location of the save files? If so, where does it try to save them?
mmm ... that's pretty much what I said in my first reply and you rejected my answer, saying the location is irrelevant.

Oh, my bad. I meant to say irrelevant WHERE on the C drive it is. I would understand it it was causing issue if it was on the root or something, but even if it is in the desktop it still causes issues, you know?

We HAVE run into this sort of thing before and do know a little bit about what might cause such issues. I was not the only one who mentioned the folder location. I also suspect some of your other answers were made a little too quickly, without actually checking things. If we ask you if a certain thing is happening, and you say no, but it actually IS happening, you're kinda making it hard for us to help you.

You should at least follow up on suggestions made before you dismiss them.

Where do these people have their games installed?
Do you have any kind of script that changes the location of the save files? If so, where does it try to save them?

It's an original



Complemented with these:







And a few changes to the yanfly save one:



Thanks in advance Shaz.
So your Diary folder ... is that still inside the folder where the game is installed?

Do you know if the people who are having these issues are admins on their PCs?

If you use the cheat to speed things up, can you reproduce the problem?

I think putting the script @TheoAllen posted into your game and getting that person to play it might be helpful. It should be compatible with the custom save scripts you have. That will at least give you a bit of a message as to what's going wrong.
So your Diary folder ... is that still inside the folder where the game is installed?

Do you know if the people who are having these issues are admins on their PCs?

If you use the cheat to speed things up, can you reproduce the problem?

I think putting the script @TheoAllen posted into your game and getting that person to play it might be helpful. It should be compatible with the custom save scripts you have. That will at least give you a bit of a message as to what's going wrong.

1) Yes:

qt87CjD.png


2) Yes, they are admins. When I had this issue I was as well with all owner properties for the folder.

3) Not anymore. I'll have to ask someone who is having the issue. I can no longer reproduce the bug in any way shape or form (which makes it a nightmare to debug).

4) Will do! I will try to see what's going on.

Original thread: https://forums.rpgmakerweb.com/threads/game-makes-the-saving-sound-but-it-deletes-the-save.103562/