I made some of my text adventure game in Notepad ++ like I was instructed, saved as a .bat file opened with cmd like instructed, and it says "would you like to start the game" 1. start the game 2. leave enter: I type 1 cmd closes anyone got an idea here is my code.
Hi simonfrat123, with properly named Variabels this runs perfectly for me. in :startup you defined an Variabel "input0" and tested afterwards for "input0" and "input" (without "0") so, i changed them to "start" in :naming you defined the variabel "input1" to be the Entered name, but in :home you tried to display the variabel "name", i changed both to be "name" (is it Variabel or Variable in english?) I've added the game.bat in the *.zip file in the attachment and here for copy n' paste: @echo OFF TITLE Game test :startup cls echo Would you like to start the game? echo. echo 1. Start the game. echo 2. Leave. echo. set /p start=Enter: if %start% equ 1 goto begin if %start% equ 2 exit goto startup :begin cls set hp=100 set gold=100 set damage=0 set armor=0 goto naming :naming echo Hello .. echo. echo What is your name? echo. set /p name=Enter: goto welcome :welcome echo Welcome to the game. echo Here are your stats... echo health - %hp% echo money - %gold% echo armor - %armor% echo. echo Press any key to continue. pause>nul goto home :home echo Hello, %name% echo -------------- echo. stats echo health - %hp% echo money - %gold% echo armor - %armor% echo Press any key to continue. echo --Here the programm ends, i dont know if you want to add more code or if this unplanned, I hope i could help you, if you have any questions just contact me. to reove this mssage Just remove this line from the file (sorry for my poor english, im from germany) pause>nul exit