Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

help

A topic by nobody5050 created Mar 10, 2018 Views: 380 Replies: 10
Viewing posts 1 to 3

im working on a batch based cyoa game for the jam and exit doesnt work for some reason could you tell me why

@ECHO OFF
:BEGIN
echo                                    this is a game made for
echo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
echo oooooooooooossooooooooooooooooooooooooooooosysoooooooosyyhhysooooooooooooooooooooooossoooosssooooooo
echo oooooshyooodNNNdsoooooooooooooooooooooooooyNNsoooooosdNNmmmMMmsooooooooooooooooooohmmNNNNNNNmmsooooo
echo ooooosmMNmmMMMMhoooooooooooooooooooooooooyNMyooooooodMNsooosNMdooooooooooooooooooyNMMMMMMMMMMMNsoooo
echo ooooooyNMMMMMMmoooooooooooooooooooooooooyNMyoooooooomMmooooomMmooooooooooooooooosmMMNssNMhshMMMhoooo
echo ooooooohNMMMNhoooooooooooooooooooooooooyNMyooyhyoooomMmooooomMmoooooooooooooooooyMMMMddNMNdmMMMNoooo
echo oooooosyhhysoooooooooooooooooooooooooosNMhooomMdoooomMmooooomMmooooooooooooooooosdNNmddmmddmNNmyoooo
echo ooooooooooooooooooooooooooooooooooooosmMhoooomMdoooomMmooooomMmoooooooooooooooooooossoooooossooooooo
echo ooooooooooooooooooooooooooooooooooooodMMNmmmmMMNmooomMmooooomMdooooooooooooooooooooooooooooooooooooo
echo oooooooooooooooooooooooooooooooooooooyyyyyyyyNMmyoooyMMdyyydMMyooooooooooooooooooooooooooooooooooooo
echo ooooooooooooooooooooooooooooooooooooooooooooodmhooooosdmNNNmdsoooooooooooooooooooooooooooooooooooooo
echo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
echo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
echo ooooooooooosmooomsooooooooooooooooooooooosdhhmsoooooooooooooooooooooooooydoooooooooooooooooooooooooo
echo ooooooooooosNyyyNsodhhdohyoyhodhhyyhhhsoohhosysosyhmosmydmyhmosdydhoooooydosyhmssmyhmyhmsooooooooooo
echo ooooooooooosNsssNssmooNodhoydomsooshhdyoohdosddohyyNssmosNooNsymyyhooooohdohyymysNooNsomyooooooooooo
echo oooooooooooodooodsohhhyosdhhhohsooyhhhsooshhhhoohhydsshoodoodsohhhsooshhhsohhyhsodoodoohsooooooooooo
echo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
echo ++++++++++++++++++++++++++++++++++++++++++++++++oooooooooooooooooooooooooooooooooooooooooooooooooooo
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ooooooooooooooooooooooooooooooooooooo+
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo +++++++++++++++++++++++++++ss+osss++++ooy+++++yo++oy++++y+++o+++++++++++oy++++++++++++++++++++++++++
echo ++++++++++++++++++++++++++oyy+h++m+++s+ys++++odo++od++++Ndsdy+++++++++sodo++++++++++++++++++++++++++
echo +++++++++++++++++++++++++++d++m+oh+++yhyy+++++h+++yo+++oh++dsyyhosd+hyohyd++++++++++++++++++++++++++
echo +++++++++++++++++++++++++++o+++so+++ooooo+++++++++o++++++++oos+s++s++sos++o+++++++++++++++++++++++++
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
pause
CLS
CHOICE /N /C:123 /M " what do you want to do (1-start, or 2-exit)"%1
IF ERRORLEVEL ==1  GOTO STARTGAME
IF ERRORLEVEL ==2 GOTO EXIT

:STARTGAME
echo welcome to escape
pause
echo this game will play like a text based adventure/choose your own adventure
pause
echo your goal is to escape, good luck
pause
goto EXIT

:EXIT
pause

Submitted

Which part is failing exactly? I can't test your code since I'm on Linux, but I know some Batch so I might be able to help

the second option which is supposed to close the program

Submitted

Well, sorry, it seems fine to me, I don't see any problems. Maybe you could add an exit in the option that ends the game

thats what i have however it seems just to want to teke me to the spot where option one is supposed to go

(+1)

You're supposed to surround the "ERRORLEVEL" with this %
so it should look like this

IF %ERRORLEVEL% ==1  GOTO STARTGAME

IF %ERRORLEVEL% ==2 GOTO EXIT

thanks

im still thanking you to this day that was very awesome

Still thanking you

Host

Thank you so much

Host

Thank you