Amateur trying a quiz-like batch file game. What am I doing wrong? -


this basis of quiz game trying make in form of batch file. i'm new, me doing wrong not unlikely. want go proper area , in demo go start, in final version go next question. happens goes first subroutine rather specified one. thank in advanced

@echo off :start echo yes or no? set /p dummy=say yes or no... if "%input%"=="yes" goto yes if "%input%"=="no" goto no if not "%input%"=="yes" goto lol if not "%input%"=="no" goto lol :yes echo worked pause echo time repeat pause goto start :no echo still worked pause echo time repeat pause goto start :lol echo did not put in yes or no. try again goto start 

input variable name use afterwards, try

set /p input=say yes or no... 

instead of dummy.
, then:

if not "%input%"=="yes" goto lol if not "%input%"=="no" goto lol 

since have caught 'yes' before, not "%input%"=="yes" true here. next line can never reached. , @ moment, can replace both lines goto lol if supposed handle 'all rest'.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -