To be more specific, here is the exact portion of code:
Code: Select all
:input
set "X%X%Y%Y%= "
choice /c awsd /n >nul
if %errorlevel%==1 (
if %Y% GTR 1 (
set /a Y=%y%-1
) else (
goto lose
)
)
if %errorlevel%==2 (
if %x% GTR 1 (
set /a x=%x%-1
) else (
goto lose
)
)
if %errorlevel%==3 (
if %X% LSS 17 (
set /a X=%x%+1
) else (
goto lose
)
)
if %errorlevel%==4 (
if %Y% LSS 25 (
set /a Y=%Y%+1
) else (
goto lose
)
)
set target=X%X%Y%Y%
if !%target!%==* set /a coinss+=1
X%X%Y%Y%
set X%X%Y%Y%=²
if %coinss% gtr 5 (
if X%X%Y%Y%==X%f%Y%t% (
call :coins
call :coins
)
)
)
if %coinss% gtr 20 (
if X%X%Y%Y%==X%f%Y%t% (
call :coins
call :coins
call :coins
)
)
if X%X%Y%Y%==X%f%Y%t%call :coins
call :grid
goto input
X is set to 12, Y is set to 17
Target is set to X%X%Y%Y%
I want the condition to activate for the variable '%X%X%Y%Y%%', or %X12Y17%.
This is a loop, so it has to work with X and Y being set to different numbers.
Sorry if this is immensely confusing.