Save and load problem

The game is simple - you get scores during a game’s scene, then it checks if a scene’s score variable is higher than Global score variable to overwrite Global variable for Best score value to be shown on the Main screen. I want this Best score to be saved if a player quit the game. So i have this event for my main scene :

And this event for my Stage’s event :

But it doesnt work. I created apk for my phone and it doesnt save the best score after I quit the game.

Unfortunately, we can’t help much with truncated screenshots.
From your description, I would guess that your save action is not executed.

1 Like

Its the only other event about Global Variable. I can see Best score on main screen without this saving system. But it just doesnt save it when i quit. Should it work like this? Because many guides on youtube shows how to implement a button Save/Load. In my case it should be saved after a player dies and Read from a storage when i open the main scene.

Hi, you don’t need to writes fruits into Scores when the player died because you already changed global var Score_Total set to fruits when fruits was greater than it. Also you can add your write condition right there. As soon as the scene var is better and you change the global var to that, then write it to storage. Player doesn’t need to be dead or to push exit then

1 Like

Thank you. For people who will face the same problem in the future - i was able to implement it with “Write text” and converting it to the number through Json .