Hello, I’m trying to make a system that displays the player’s high score in the home menu of my game. The problem is that the high score does not want to display. I have been trying for several hours to fix this problem but to no avail. can anyone find where my error comes from please? thanks in advance
Hey there @SanDuKul! I think the first move in cases where saving/loading is involved is to verify the load gets the correct data consistently, so feel free to set that up as a print first to verify. Then I’d move on to verifying the UI is bound correctly to the variable, I see you have all the save logic in your Third person character. I usually recommend having it inside your GameInstance or somewhere similar that is always running in every scene though that’s not likely your issue. Does the bind function run ever?
hi the function seems to run because i get the message “save was not done (la sauvegarde n’a pas été effetué)” (print sring) all the time in the false of the branch after the do once. however, if I put a print string in the true I still get the print string of the false even after it should have created the backup
Do the “Save Successful” bools show true or false for each of those save game slots? Also what I’d do is load the data once, and pop it in a variable instead of loading the data to call it up when you need.
thanks for your answer
precisely my condition for the branch is if the score is higher than the best score then it saves it after the other branch is used to check if the backup exists if not it creates one and if there is one it load I think I expressed myself badly in my previous message: I don’t have a boolean variable “save sucefful?” I just wanted to say that I had put a print strings in the true or the false to see if it saves but whatever happens it does not manage to create the backup so the print string displayed is in the false of the branch " backup does not exist"
I found the problem: I did not call the right variable! it works now apart from android version 11+