Preventing false loading
Posted: 06 Aug 2013 17:12
So I need a bit of help with my batch program.
I save like this.
(
echo variable1
echo variable2
) > save.sav
I load like this.
< save.sav (
set /p variable1=
set /p variable2=
)
goto town (It's setup like a game)
My save and load works but you can load without a sav file and if you do the game wont show the
variables because it sets them up when you do new game. I know people wont naturally select load without a save file but I'd like to make it
professional. So what I'd like is to know if I can do something like if there is no .sav file it will bring you back to menu.
I save like this.
(
echo variable1
echo variable2
) > save.sav
I load like this.
< save.sav (
set /p variable1=
set /p variable2=
)
goto town (It's setup like a game)
My save and load works but you can load without a sav file and if you do the game wont show the
variables because it sets them up when you do new game. I know people wont naturally select load without a save file but I'd like to make it
professional. So what I'd like is to know if I can do something like if there is no .sav file it will bring you back to menu.