Well, it seems that ever time I write an integer to a file, it stores it fine, until the value goes above 220, in which case it resets to a random number under 100. I would really like some help on this, as it is incredibly important to my game.
P.S. here's the code:
if file exist("media\saves\save.dat")=1
delete file "media\saves\save.dat"
open to write 1,"media\saves\save.dat"
write byte 1,Character.Experience
write byte 1,Character.Gold
close file 1
else
if file exist("media\saves\save.dat")=0
open to write 1,"media\saves\save.dat"
write byte 1,Character.Experience
write byte 1,Character.Gold
close file 1
endif
endif