I have searched the forums and google but have come up empty.
Basically what I need to do is when the player inputs 's' I need it to save the current position in the program, and then when the player inputs 'l' it loads that position.
This is for a text based adventure game so imagine it like so:
(Narrative text here 30 minutes into the game) Blah blah blah blah, blah blah blah
1. Option
2. Option
>> (inputting 's' saves the game)
I know how to check the input to see if the player types s, I just don't know how to code the function to make it save a file that remembers where in the code that the player was.
Figure out what data in the game you need to save; for a example, current room, items on hand, etc. and save the data. When you load the game, read it in from a text file.
I am actually probably going to focus it similarly to one of those 'choose your own adventure' books. What I am looking for is a way to let the game know where in the story the player is.
After reading on the control structure "goto ___" would it be viable to do the following?: