VOGONS


Batch menu [RESOLVED]

Topic actions

First post, by acoolguy

User metadata
Rank Newbie
Rank
Newbie

Ok guys i have this menu i made in dos for dosbox now the issue is
it wont do anything at all on the last choice (K) no error messages or anything
everything else works fine with no errors at all.
Any help please ?


:start
echo off
cls
echo 0) Exit.
echo A) Play Little Devil With Health Cheat.
echo B) Play Little Devil With No Cheats.
echo C) Play Crystal Maze.
echo D) Play Dizzy Fantasy World.
echo E) Play Dizzy Magicland.
echo F) Play Dizzy Prince Of The Yolkfolk.
echo G) Play Dizzy Fastfood.
echo H) Play Dizzy Kwik Snax.
echo I) Play Dizzy Bubble.
echo J) Play Dizzy Fantastic.
echo K) Play The 7th Guest.


CHOICE /N /C:0ABCDEFGHIJK Choose a option.


IF ERRORLEVEL == 12 GOTO guest
IF ERRORLEVEL == 11 GOTO diz
IF ERRORLEVEL == 10 GOTO bubdiz
IF ERRORLEVEL == 9 GOTO ksdiz
IF ERRORLEVEL == 8 GOTO ffdiz
IF ERRORLEVEL == 7 GOTO podiz
IF ERRORLEVEL == 6 GOTO mdiz
IF ERRORLEVEL == 5 GOTO fdiz
IF ERRORLEVEL == 4 GOTO cmaze
IF ERRORLEVEL == 3 GOTO divil2
IF ERRORLEVEL == 2 GOTO divil1
GOTO quit


:divil1
cd C:\DIVIL
divil.exe
GOTO start

:divil2
cd C:\DIVIL
divil1.exe
GOTO start

:cmaze
cd C:\Crystal
cmaze.exe
GOTO start

:fdiz
CD C:\DIZZY
dizzy3.exe
GOTO start

:mdiz
CD C:\DIZZY
dizzy4.exe
GOTO start

Show last 36 lines
:podiz
CD C:\DIZZY
dizzy6.exe
GOTO start

:ffdiz
CD C:\DIZZY
dizzy10.exe
GOTO start

:ksdiz
CD C:\DIZZY
dizzy11.exe
GOTO start

:bubdiz
CD C:\DIZZY\Bubble
bubble.exe
GOTO start

:diz
CD C:\DIZZY\FANT
pcdizzy.exe
GOTO start

:guest
echo The 7th Guest
imgmount d c:\t7g_1.iso c:\t7g_2.iso -t cdrom
cd C;\t7g
t7g.bat
GOTO start

:quit
EXIT

Last edited by acoolguy on 2011-06-08, 07:14. Edited 1 time in total.

Reply 2 of 5, by acoolguy

User metadata
Rank Newbie
Rank
Newbie

Thanks for that however
that would throw up a error not do NOTHING at all as it dont even know K is a choice so it doesnt even get to that to throw up a error 🙁

EDIT:
It's ok that fixed it thanks 😀

But what i dont get is why it never threw up a error or echoed the statement that was before the error?

Reply 3 of 5, by VileR

User metadata
Rank l33t
Rank
l33t
acoolguy wrote:

But what i dont get is why it never threw up a error

it probably did, but then it went back to :start which does a "cls", so you just didn't see it.

or echoed the statement that was before the error?

"echo off" would tend to do that.

Reply 4 of 5, by acoolguy

User metadata
Rank Newbie
Rank
Newbie

Ahh right i forgot about that thanks 😀

Reply 5 of 5, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

You shouldn't use "cd c:\xyz" but rather the two commands "c:" followed by "cd\xyz" or "cd xyz" (the latter if you know you're in the root/relevant directory).