I have this batch file project for school. In the beginning you are asked to fight or stay, then if fight armor or not. When you buy armor it takes you to the wrong screen. Not the screen for buying armor. Plz help. Included is the file. @echo off
title Crusaders
::ll
:menu
color 84
cls
echo ________________________________________________________________________________
echo CRUSADERS
echo --------------------------------------------------------------------------------
echo Type "start" to begin the game.
echo Type "commands" to view commands.
set /p test=. Command:
cls
if %test%==commands goto :commands (
) else (
if %test%==credits goto :credits (
) else (
if %test%==menu goto :menu (
) else (
if %test%==exit goto :eof (
) else (
if %test%==start goto :start (
) else (
if not %test%==start goto :menu (
)
)
)
)
)
)
:commands
echo ________________________________________________________________________________
echo COMMAND LIST
echo --------------------------------------------------------------------------------
echo commands: Shows command list.
echo menu: Back to main menu.
echo credits: Shows credits.
echo exit: Goes back to CMD.
set /p test=. Command:
cls
if %test%==commands goto :commands (
) else (
if %test%==credits goto :credits (
) else (
if %test%==menu goto :menu (
) else (
if %test%==exit goto :eof (
) else (
if %test%==start goto :start (
) else (
if not %test%==start goto :menu (
)
)
)
)
)
echo Invalid command.
)
cls
:credits
echo ________________________________________________________________________________
echo CREDITS
echo --------------------------------------------------------------------------------
echo Creators
echo Brad Walters
echo Aidan Taylor
set /p test=. Command:
cls
if %test%==commands goto :commands (
) else (
if %test%==credits goto :credits (
) else (
if %test%==menu goto :menu (
) else (
if %test%==exit goto :eof (
) else (
if %test%==start goto :start (
) else (
if not %test%==start goto :menu (
)
)
)
)
)
echo Invalid command.
)
:start
cls
echo ________________________________________________________________________________
echo CRUSADERS
echo --------------------------------------------------------------------------------
set /p name=. Enter your characters name:
echo Pope Urban II has been talking of war.
echo The people of Jerusalem have fallen to the Turkish.
echo The old people of Jerusalem where fairly kind to us,
echo even though our beliefs where not alike.
echo But the Turkish. They slaughtered many of our faith.
echo Both the old people of Jerusalem and the Turks where Islamic,
echo but the old people of Jerusalem accepted the fact we where christian.
echo Now, Pope Urban is reaching out to the people,
echo requesting that we help him take Jerusalem from the Turks.
echo He claims that if we are to help him in the war and die while doing so,
echo we are granted immediate access to heaven.
echo So %name%. You are now with a choice.
echo 1. Join Pope Urban in the war against the Turks.
echo 2. Stay home, and go back to being a lowly peasant.
set /p choiceuno=Enter the number of your choice:
if %choiceuno%==1 goto :1a (
) else (
if %choiceuno%==2 goto :1b (
) else (
if not %choiceuno%==2 goto :start
)
)
cls
:1a
cls
echo ________________________________________________________________________________
echo CRUSADERS
echo --------------------------------------------------------------------------------
echo Before you can go on the crusade,
echo you must first aquire some armour.
echo You can buy some, at the cost of most of your coin.
echo You are now with a choice.
echo 1 Buy armour.
echo 2 Keep your coin.
set /p 1a=Enter the number of your choice:
if "%c%" EQU "1" goto :2a
if "%c%" EQU "2" goto :2b
:1b
cls
echo ________________________________________________________________________________
echo CRUSADERS
echo --------------------------------------------------------------------------------
echo You didn't go? What a shame. I am dissapointed in you. Going back to main menu.
pause
goto :menu
cls
:2a
cls
echo ________________________________________________________________________________
echo CRUSADERS
echo --------------------------------------------------------------------------------
echo You buy armour with a red cross on it.
echo This is the symbol of the crusaders.
echo Now that you have armour, your ready to go to Jerusalem.
echo Well, almost.
echo You need a way to get there.
echo You can travel in a group, (safer) but take time to assemble one.
echo Or, you can travel alone.
echo You are now with a choice.
echo 1. Travel in a group.
echo 2. Travel alone.
set /p 2a=Enter the number of your choice:
cls
if %2a%==1 goto :3a (
) else (
if %2a%==2 goto :3b (
)
)
:2b
echo ________________________________________________________________________________
echo CRUSADERS
echo --------------------------------------------------------------------------------
echo You keep your money.
echo You need a way to get to Jerusalem.
echo Do you choose to travel in a group, or travel alone?
echo You are now with a choice.
echo 1. Travel in a group.
echo 2. Travel alone.
set /p 2b=Enter the number of your choice:
cls
if %2b%==1 goto :3c (
) else (
if %2b%==2 goto :3d (
)
)
:3a
:3b
:3c
:3d
echo ________________________________________________________________________________
echo CRUSADERS
echo --------------------------------------------------------------------------------
echo On the way, you are beaten and killed by a group of theifs.
echo Going alone?
echo Without armour?
echo What did you think was going to happen?
goto :menu
:eof