I'm trying to make a money checker for a game, however I keep getting the error: "5 was unexpected at this time."
Code:
:711Beans
title BEANS AAAAAAA
if %money% LSS 5 (
title No Money?
cls
echo Silly, you don't have enough money to buy beans.
echo Cash Money: $%money%
pause>nul
goto 711
)
if %money% GEQ 5 (
cls
set /a money=%money%-5
echo You buy some beans from the 7/11 for 5$
echo Cash Money: $%money%
pause>nul
goto 711
)
So what I've tried is adding: "setlocal ENABLEDDELAYEDEXPANSION" at the top of my batch file and that also didn't work. Could someone explain why this error is occurring and how to fix it?
Thanks in advance.