ok, im going to use loads of variables instead of actual numbers here, so you can change it easy. this example i will save health,x position,y position, z position
rem save game
open to write "save.sav",1
write byte 1,health#
write byte 1,xpos#
write byte 1,ypos#
write byte 1,zpos#
close file 1
rem load game
open to read "save.sav",1
read byte 1,health#
read byte 1,xpos#
read byte 1,ypos#
read byte 1,zpos#
close file 1
i should mention that where you read from the file, it isn't reading what you tell it to (ie read byte 1,health# DOESN'T read the value for health)
each time you read, it reads a new line, so you MUST read them back the same way you saved them, the variable is just where it stores the data
there are better/faster ways of doing this ie arrays, but i don't bother with them (more options this way)
[EDIT]
by the way, if you try and write to a file that already exists, it won't work. to fix that just change the code to this:
rem save game
IF file exist("save.sav")=1 THEN delete file "save.sav"
open to write "save.sav",1
write byte 1,health#
write byte 1,xpos#
write byte 1,ypos#
write byte 1,zpos#
close file 1