I'm working on my first game in a batch file and I keep getting the error of "'taken was unexpected at this time'". "taken" is what I'm assigning the variable "shotgun" as. What I'm trying to make is so that if the user hasn't "picked up the shogun" it will make them stay in the current area, but if they did pick it up It will move them to the other "live" area.
: barn
echo. You enter the barn, it's creeky and it's dark, just as it is outside.
echo.
echo. You wonder if anything of use is in this barn.
echo.
echo. Should you check under the staircase to the left or to the right?
echo.
set /p command =
echo.
if %command% equ right goto barn_right
if %command% equ left goto barn_left_die
: barn_left_die
if %shotgun% equ taken goto barn_left_live
echo. You hear creeking in the floorboards to the right, an infected jumps at you tearing you into pieces.
echo.
echo. YOU ARE DEAD
echo.
pause
: barn_left_live
echo. You hear creeking in the floorboards to the right, you kill the infected that jumps at you with your shotgun!
echo. You decide to go to a different building, do you go to the shed or house?
echo.
set /p command =
echo.
if %command% = shed goto shed
if %command% = house goto house
: barn_right
echo. You see a glint in the dark, it appears to be the moon light reflecting off the steel of a shotgun barrel.
echo.
echo. You take the shotgun.
echo.
set /p shotgun = taken
echo. Should you now go to the house, shed, or check underneath the left staircase?
echo.
set /p command =
echo.
if %command% = shed goto shed_die
if %command% = house goto house_die
if %command% = left goto left_staircase_die
pause