S
someone38764
' below is a record structure in a module named Globals
Public Structure TUserStats
Public BestCompleted As Integer
Public BestAverage As Single
Public BestPercentage As String
End Structure
Public UserStats as TUserStats
Globals.UserStats.BestPercentage = "100 percent "
Globals.UserStats.BestCompleted = 99
Globals.UserStats.BestAverage = 0.8
FileOpen(1, "TESTFILE.data", OpenMode.Binary)
FilePut(1, Globals.UserStats.BestPercentage)
FilePut(1, Globals.UserStats.BestCompleted)
FilePut(1, Globals.UserStats.BestAverage)
FileClose(1)
' the only thing that can be read from the file is the
' string "BestPercentage"
' why can't I read the numbers? I'm getting gibberish
' instead of the correct numbers
Public Structure TUserStats
Public BestCompleted As Integer
Public BestAverage As Single
Public BestPercentage As String
End Structure
Public UserStats as TUserStats
Globals.UserStats.BestPercentage = "100 percent "
Globals.UserStats.BestCompleted = 99
Globals.UserStats.BestAverage = 0.8
FileOpen(1, "TESTFILE.data", OpenMode.Binary)
FilePut(1, Globals.UserStats.BestPercentage)
FilePut(1, Globals.UserStats.BestCompleted)
FilePut(1, Globals.UserStats.BestAverage)
FileClose(1)
' the only thing that can be read from the file is the
' string "BestPercentage"
' why can't I read the numbers? I'm getting gibberish
' instead of the correct numbers