Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

MS DOS input incorrectly redirecting

do I'm trying to give the user a choice of where thye go, but no matter what they press, it always goes to :ATTACKSPIDER
Note: this is an exerpt of only the malfunctioning code.

:OUTSIDEHOUSE
CLS
ECHO.
IF %SPIDER%==0 (
ECHO You are outside your house. It looks like a small tan brick hut.
ECHO A bit off you can see the town and the forest.
ECHO 1-Go inside your house.
ECHO 2-Go to town.
ECHO 3-Go to Forest.
ECHO 4-Go to back of house.
SET /P CHOICE=TYPE
IF /I '%CHOICE%'=='1' GOTO BEDROOM
IF /I '%CHOICE%'=='2' GOTO TOWN
IF /I '%CHOICE%'=='3' GOTO FOREST
IF /I '%CHOICE%'=='4' GOTO HOUSEBACK
)
IF %SPIDER%==1 (
ECHO You are outside your house. It looks like a small tan brick hut.
ECHO A bit off you can see the town and the forest.
ECHO You also notice a 10ft wide black spider by the side of your house.
ECHO 1-Go inside your house.
ECHO 2-Go to town.
ECHO 3-Go to Forest.
ECHO 4-Go to back of house.
ECHO 5-Attack Spider
ECHO 6-Use Magic Muffin On Spider
SET /P CHOICE=TYPE
IF /I '%CHOICE%'=='1' GOTO BEDROOM
IF /I '%CHOICE%'=='2' GOTO TOWN
IF /I '%CHOICE%'=='3' GOTO FOREST
IF /I '%CHOICE%'=='4' GOTO HOUSEBACK
IF /I '%CHOICE%'=='5' GOTO ATTACKSPIDER
IF /I '%CHOICE%'=='6' GOTO MUFFINONSPIDER
)

:ATTACKSPIDER
CLS
ECHO.
IF %GUN%==0 (
ECHO You do not have a weapon capable of defeating the spider.
ECHO You are punted so hard you time warp into a 7-11.
PAUSE
GOTO 711
)
IF %GUN%==1 (
ECHO You Defeat Spider with the gun. Spider flees.
ECHO The spider drops a rusty key.
SET KEY=1
SET SPIDER=0
PAUSE
GOTO OUTSIDEHOUSE
)

any help on why this is happening would be greatly apprecitated
Sign In or Register to comment.