VOGONS


First post, by Robhalfordfan

User metadata
Rank Oldbie
Rank
Oldbie

hello all

i am try make my own bat file for my dos games that has multiple episodes in dos 6.22

i have been trying to use the choice command but no matter what option i press, it always loads up ep 1 instead of another and even when i choose to exit the "menu" or a syntax error

if there is a easier way to do this or a example somewhere that i can use to understand what i am doing wrong

any help would great

Reply 1 of 2, by keropi

User metadata
Rank l33t++
Rank
l33t++

Here I made one such .bat for you
notice how the IF ERRORLEVEL statements are going backwards
just adapt it to your needs adding/removing choices

echo  Choose an episode to launch
echo.
echo 1. Episode 1
echo 2. Episode 2
echo 3. Episode 3
echo 4. Exit
echo.
CHOICE /C:1234

IF ERRORLEVEL 4 GOTO END
IF ERRORLEVEL 3 GOTO EPISODE3
IF ERRORLEVEL 2 GOTO EPISODE2
IF ERRORLEVEL 1 GOTO EPISODE1


:EPISODE1
< command to load this episode>
GOTO END

:EPISODE2
< command to load this episode>
GOTO END

:EPISODE3
< command to load this episode>
GOTO END

:END

🎵 🎧 MK1869, PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 2 of 2, by Robhalfordfan

User metadata
Rank Oldbie
Rank
Oldbie

i did not know the errorlevels choices had to backwards

and i noticed a spelling error on my part which affect the rest of choices but all works and load to corresponding episodes

will keep this as guide for any other dos game/program that has mutiple episode and if some slowdown software or other stuff loads before game

thank you for your help