You can save stuff to files using the OPEN TO WRITE command. The way to do this is as follows:
At the start of the game, check if the save file exists. IF FILE EXIST(...) = 1 etc
If it does, OPEN TO READ and get all the values out and into arrays. The arrays must be the same type, size and in the same order that you saved them in, otherwise your save file will mess up.
If it doesn't, then you'll have to start a new game. Fill the arrays with default data.
As the game is played, values in the arrays are changed.
When the game has ended, delete the save file. This is because OPEN TO WRITE will only create a file, not add to an existing one.
Immediately afterwards, OPEN TO WRITE a new save file with the same name.
Write all the data from the arrays to the file, in exactly the same order as you read them out, thus enabling you to read the new values out properly next time.
Done.
Remember, only delete the save file immediately before creating a new one. This prevents you losing the save file if the game crashes halfway through.
You probably should encrypt the save file somehow, so people can't just open it in notepad and change all the values.
Once I was but the learner,
now, I am the Master.