If the user inputs something blank the if
statement fails:
set var=
if %var%==blah Echo BLAH
Rem The above results in :: if ==blah Echo BLAH :: Which will crash CMD
set var=
if "%var%"=="blah" Echo BLAH
Rem The above results in :: if ""=="blah" Echo BLAH :: Which will result in false
So surrounding the statement in quotes will result in:
:start
cls
echo You need to decide NOW, are you going to barricade yourself in (Bug in),
echo or go to somewhere out of town (Bug out)?
echo.
set /p bug=I want to bug
if "%bug%"=="In" goto bugin
if "%bug%"=="Out" goto bugout
if "%bug%"=="in" goto bugin
if "%bug%"=="out" goto bugout
echo.
echo Invalid selection
pause
cls
goto start
Which should work.
Mona