Hello. I create a game in this program for the first time. (I previously had experience with other programs). When I created the save for the first time, they worked, they were in order for the coins that were already collected to no longer appear. Everything worked. But now I tried to create a save to save the accumulated amount of money. And it does not work. On screenshots, you can see my entire conservation scheme, and what happens as a result. And yet, this is not so important, but it is possible if you know how to delete already created saves in the editor itself? I collected coins, the program kept everything and they no longer appear, can I somehow get them back?
Make sure you create a scene variable in the variable editor and read the value from storage in to that variable.
I believe this is the only feature that require you to do it this way. It is because if you don’t do it, At the time the storage event attempt to read the value, the variable is going to be undefined and the attempt to assign a value to the variable fail. If you add a variable in the variable editor, the variable is being initialized at the time the scene begin and by the time the storage event attempt to use it.
Actually using the variable editor would be the preferred way to do it instead of just call a variable out of nowhere. It works for the most part because GDevelop is nice except in this case. When using the storage event, you must add the variable to the variable editor and it must be a scene variable in order to work.
An other mistake people often do is that you try to read text in to a number variable or number in to a text variable. Obviously you need to read number in to number var and text in to text var.
You can also find an example included with GDevelop for “save-load”. Take a look.
Thanks for your answer. I am already solved a problem and wanted to close question.
So the solution was something I mentioned or anything else?
When you ask a question it is a nice practice if you share or confirm the solution so people read it later on can find the solution too.
I changed everything as shown in https://www.youtube.com/watch?v=ziXd1AyUo-k this video. Then there was a problem with the fact that the save worked, but only for the scene variable, and the global variable was reset. I decided this by starting with a global variable, the value of the scene that was saved.
Thanks for sharing.