ok so just trying to get a simple highscore functioning, and it does but every time i close the game the highscore resets to zero or if i dont score i get NaN
on the first layout (in reference to highscores) i have:
global highscore = 0
on start -
local key "HighScore" exists - set highscore to WebStorage.LocalValue("HighScore")
else - set local key WebStorage.LocalValue("HighScore") to 0
on the game over layout (in reference to highscores) i have:
score > WebStorage.LocalValue("HighScore") - set WebStorage.LocalValue("HighScore") to score
------------------------------------------------set highscore to score
------------------------------------------------set text to "Highscore" & highscore
score < or equal to highscore - set text to "Highscore" & highscore
just as a note when i change the "set text to "HighScore" & highscore to score"
to
"set text to "HighScore" & WebStorage.LocalValue("HighScore") to score"
the output is just HighScore