The expression if errorlevel evaluates to true if the actual error level returned by choice is greater than or equal to the specified value. Therefore, if you press 3, the first if statement will be true and the script will exit. Call help if for more information.
There are two simple workarounds.
First (better) - replace the if errorlevel expression with the actual comparison of the %ERRORLEVEL% system variable with the given value:
if "%ERRORLEVEL%" == "1" goto exit if "%ERRORLEVEL%" == "2" goto about if "%ERRORLEVEL%" == "3" goto play
The second is to change the comparison order:
if errorlevel 3 goto play if errorlevel 2 goto about if errorlevel 1 goto exit
source share