I'm trying to make a CYOA game through .bat files. I want the user to be in a loop until they want to leave but I can't get an IF inside the loop (the conditional to exit) to work.
set "can1=0"
:w1
:: vvv I think it's this line that doesn't work vvv
if not "%can1%"=="1" (
if /i "%r1%"=="look around" (
echo Anything else?
set /p r1=":: "
goto :w1
)
:: ...
) else (
echo Can continue...
)
endlocal
I want the loop to continue until the player says something specific (I'll determine that later), but it gives the
The syntax of the command is incorrect.
error that seems to be case-specific.