Saving the contents of a stack in another file
Posted: Thu Dec 12, 2013 10:29 am
Hello forum members,
Ok so my problem is that I can't figure out how to save my stack in another file which can then be opened from within the stack again. Currently I am studying computing at school and must complete a project with several "complex" functions so as to get a good grade. I have made a text based game and one of the complex functions I thought would be good was the ability to save the progress made in the game. Unfortunately I can't quite find a way of saving anything other than text to another file. I tried the "save" command but that literally saves the stack which I guesses would be the case. So my question is, is it possible to save the content of everything in a stack to file in a way that it can be opened again like other games offer? The idea being that I need to save the contents of certain variables that have changed due to the players actions such as picking up items etc. Any help is much appreciated. Thank you!
Ok so my problem is that I can't figure out how to save my stack in another file which can then be opened from within the stack again. Currently I am studying computing at school and must complete a project with several "complex" functions so as to get a good grade. I have made a text based game and one of the complex functions I thought would be good was the ability to save the progress made in the game. Unfortunately I can't quite find a way of saving anything other than text to another file. I tried the "save" command but that literally saves the stack which I guesses would be the case. So my question is, is it possible to save the content of everything in a stack to file in a way that it can be opened again like other games offer? The idea being that I need to save the contents of certain variables that have changed due to the players actions such as picking up items etc. Any help is much appreciated. Thank you!