How to save highest highscore?

Greeting to all… I made auto save and load with the help for you all . But now my highscore change each time when I play the game. But I want keep the highest 1 as a score. How to do??
Please help

1 Like

Please don’t make multiple posts about the same question. It is considered spam.


If the variable highscore is less than the variable score,set the variable highscore to the value of variable score.

1 Like

Arthuro sir,
I don’t make multiple posts about the same question… earlier I asked about auto save but now I asking how to keep the highscore

Crafterz sir,
It didn’t work… i give two screenshots to you. So will you please check for the errors in it and 1 more problem is there when my player fall automatically score add extra 1 point for no reason why?? Help me please :pleading_face:

It’s better to share the screenshots here, so everyone can help, and so the future readers of this topic will follow the troubleshooting. :slight_smile:

1 Like

Ok Gruk… but I was at my cousin house so didn’t upload the screenshot…
Gruk big fan of yours thank you for the suggestion :blush::blush::blush::blush::blush::blush::blush:

Please help me to solve this issue.

No problem, I said that because I thought you sent the screenshots as private message. :slight_smile:

its not, when he falls, but when he jumps.
and it happens, because you made it happen

i have no clue what you tried to achieve with this.

you need to use the scene variable score.
and when you complete a level, or die, then you have 1 check, if your scene variable score is greater than your global variable high score, and if it is, change the global variable high score set to scene variable score.

1 Like

Slash bro,
I need your help again… So, will you please
Make events for Autosave and load… With keep the highest score which won’t be change each time… Please I need your expertise regarding this problem :blush::blush:

play attantion to the order of the events.
first, when dieing or finishing the level, you check if score > high score
if yes, then you set the high score to the score and then save the high score.
after the data is collected and saved, you switch/restart the scene

any scores the player can get, do +1 to the scene variable score.
also, you might consider having 2 text objects, 1 for global variable high score, that shows the highest score and another text object to set to scene variable score (to show your current score).


Slash bro,
You are God of gdevelop… .
I searched lots of videos and did experiment but nothing happened. But with your expertise it’s works…
Thank youuuuuuuuuu so muchhhhhhhhhhhh