This is how I would do it ...
You need to bear in mind that the file is read in the order it was written.
You need to bear in mind that the file is read in the order it was written.
type Player field ammo field money end type global ME.player = new Player ME\ammo = 10 ME\money = 5
Function SAVEgame( filename$ ) file = writefile( filename ) writeint( file, ME\ammo ) writeint( file, ME\money ) closefile file End function Function LOADgame( filename$ ) file = openfile( filename ) ME\ammo = readint( file ) ME\money = readint( file ) closefile file End function