I was creating a batch game, and I had a previous game I made so I could remember stuff from the code.
On the game I was working on the If and Goto command where not working. So I testing my previous game, and it worked fine with things like that. So I created This:
@echo off
title test
:1
cls
echo testing Testing 123
echo Type Go
set /p 123=
if %123% == Go goto 2
if %123% == go goto 2
:3
echo Gone wrong :(
pause
exit
:2
cls
echo Worked
pause
exit
And When I type Go
It says Gone Wrong :(
Can anyone help me with this?
You never should use a variable with a name that start in digit:
In previous line
%1
is replaced by the first parameter of the Batch file, so the real comparison is: