I do not know how to save without all the variables being erased.
Could anybody point me to a website, or show me how to?
Printable View
I do not know how to save without all the variables being erased.
Could anybody point me to a website, or show me how to?
Look up in your help files these functions:
Open #
Close #
Get #
Put #
Write #
Print #
Input #
You can create a file on the hard disk and save all your variables in a certain order, then just read them all again in that order when you start the game up again.
It's not complicated. File access is something everyone should know how to use, so check it out.
Code:Open "Game.txt" For Output As #1
Write #1, HitPoints, Strength, Defense, Level
Close #1
how do you get the info that was written?
If you use Write # then you can use Input # to get the info back again and store it in variables.
That would read those variables back in from the file.Code:Open "Game.txt" For Output As #1
Input #1, HitPoints, Strength, Defense, Level
Close #1
Thanx for all the help... i really appreciate it.
I don't care much for the cheating part, as this is a school project and im sure my teacher won't be cheating.
once again, thanks.