I seem to be tripping myself up here. I am loading/saving out a single line of text with an integer value.
I read it back in to highscore. Before saving out I check the score against highscore and if it is higher replace it.
I get an error when trying to convert the highscore from the text property
var n as integer = integer.FromText( highscore )
if score > n then
highscore = score.ToText
Dim file As FolderItem = SpecialFolder.Documents.Child(“hs.txt”)
If file <> Nil Then
Dim output As TextOutputStream output = TextOutputStream.Create(file, TextEncoding.UTF8) output.WriteLine(highscore) output.Close