2
« on: April 10, 2012, 10:35:10 PM »
This code crashes my game, if someone could point out the errors or correct it that would be nice.
Incase you are stupid and didn't read the title its in Batch.
:StrengthPoint
SET Level=StrengthPoint
cls
echo This might be a good time to ask, how strong are you?
echo Note that you have 5 skills, Strength, Archery, Intelligence, Agility, and Persuasion.
echo Each skill can be positioned on a meter of 5 levels. If you set strength to level 5, nothing else can be level 5.
echo Once a level for a skill has been set, it cannot be changed, or have anything else at the same level.
echo.
echo Strength levels decide how strong or weak you are, how good you will do in a fight, if you can open a sealed door, and much more.
echo Choose wisely.
echo.
echo 1.) One guy punched me and had to wait an hour before he felt me hitting him back. - Level 1
echo.
echo 2.) I'm not very strong. - Level 2
echo.
echo 3.) I am fairly average. - Level 3
echo.
echo 4.) You could say I am quite strong. - Level 4
echo.
echo 5.) I am extremely strong. - Level 5
echo.
SET /p choice= Your Strength level is :
if %choice%==1 goto Strength1
if %choice%==2 goto Strength2
if %choice%==3 goto Strength3
if %choice%==4 goto Strength4
if %choice%==5 goto Strength5
goto StrengthPoint
:StrengthTaken
echo Sorry, that skill level is taken by another skill.
echo.
pause
goto StrengthPoint
:Strength1
if %Stregth%==1 goto StrengthTaken
if %Archery%==1 goto StrengthTaken
if %Agility%==1 goto StrengthTaken
if %Persuasion%==1 goto StrengthTaken
if %Intelligence%==1 goto StrengthTaken
SET /a Strength=1
goto ArcheryPoint
:Strength2
if %Stregth%==2 goto StrengthTaken
if %Archery%==2 goto StrengthTaken
if %Agility%==2 goto StrengthTaken
if %Persuasion%==2 goto StrengthTaken
if %Intelligence%==2 goto StrengthTaken
SET /a Strength=2
goto ArcheryPoint
:Strength3
if %Stregth%==3 goto StrengthTaken
if %Archery%==3 goto StrengthTaken
if %Agility%==3 goto StrengthTaken
if %Persuasion%==3 goto StrengthTaken
if %Intelligence%==3 goto StrengthTaken
SET /a Strength=3
goto ArcheryPoint
:Strength4
if %Stregth%==4 goto StrengthTaken
if %Archery%==4 goto StrengthTaken
if %Agility%==4 goto StrengthTaken
if %Persuasion%==4 goto StrengthTaken
if %Intelligence%==4 goto StrengthTaken
SET /a Strength=4
goto ArcheryPoint
:Strength5
if %Stregth%==5 goto StrengthTaken
if %Archery%==5 goto StrengthTaken
if %Agility%==5 goto StrengthTaken
if %Persuasion%==5 goto StrengthTaken
if %Intelligence%==5 goto StrengthTaken
SET /a Strength=5
goto ArcheryPoint
:ArcheryPoint
cls
echo This might be a good time to ask, how good at Archery are you?
echo Note that you have 5 skills, Strength, Archery, Intelligence, Agility, and Persuasion.
echo Each skill can be positioned on a meter of 5 levels. If you set strength to level 5, nothing else can be level 5.
echo Once a level for a skill has been set, it cannot be changed, or have anything else at the same level.
echo.
echo Archery decides how well you use ranged weapons.
echo Choose wisely.
echo.
echo 1.) I am Level 1
echo.
echo 2.) I am Level 2
echo.
echo 3.) I am Level 3
echo.
echo 4.) I am Level 4
echo.
echo 5.) I am Level 5
echo.
SET /p choice= Your Archery level is :
if %choice%==1 goto Archery1
if %choice%==2 goto Archery2
if %choice%==3 goto Archery3
if %choice%==4 goto Archery4
if %choice%==5 goto Archery5
goto StrengthPoint
:ArcheryTaken
echo Sorry, that skill level is taken by another skill.
echo.
pause
goto ArcheryPoint
:Archery1
SET /a Archery=1
if %Stregth%==1 goto ArcheryTaken
if %Archery%==1 goto ArcheryTaken
if %Agility%==1 goto ArcheryTaken
if %Persuasion%==1 goto ArcheryTaken
if %Intelligence%==1 goto ArcheryTaken
goto AgilityPoint
:Archery2
if %Stregth%==2 goto ArcheryTaken
if %Archery%==2 goto ArcheryTaken
if %Agility%==2 goto ArcheryTaken
if %Persuasion%==2 goto ArcheryTaken
if %Intelligence%==2 goto ArcheryTaken
SET /a Archery=2
goto AgilityPoint
:Archery3
if %Stregth%==3 goto ArcheryTaken
if %Archery%==3 goto ArcheryTaken
if %Agility%==3 goto Archeryaken
if %Persuasion%==3 goto ArcheryTaken
if %Intelligence%==3 goto ArcheryTaken
SET /a Archery=3
goto AgilityPoint
:Archery4
if %Stregth%==4 goto ArcheryTaken
if %Archery%==4 goto ArcheryTaken
if %Agility%==4 goto ArcheryTaken
if %Persuasion%==4 goto ArcheryTaken
if %Intelligence%==4 goto ArcheryTaken
SET /a Archery=4
goto AgilityPoint
:Archery5
if %Stregth%==5 goto ArcheryTaken
if %Archery%==5 goto ArcheryTaken
if %Agility%==5 goto ArcheryTaken
if %Persuasion%==5 goto ArcheryTaken
if %Intelligence%==5 goto ArcheryTaken
SET /a Archery=5
goto AgilityPoint
:AgilityPoint
cls
echo This might be a good time to ask, how good at Agility are you?
echo Note that you have 5 skills, Strength, Agility, Intelligence, Archery, and Persuasion.
echo Each skill can be positioned on a meter of 5 levels. If you set strength to level 5, nothing else can be level 5.
echo Once a level for a skill has been set, it cannot be changed, or have anything else at the same level.
echo.
echo Agility decides how well you run and jump, climb, sneak, and more.
echo Choose wisely.
echo.
echo 1.) I am Level 1
echo.
echo 2.) I am Level 2
echo.
echo 3.) I am Level 3
echo.
echo 4.) I am Level 4
echo.
echo 5.) I am Level 5
echo.
SET /p choice= Your Agility level is :
if %choice%==1 goto Agility1
if %choice%==2 goto Agility2
if %choice%==3 goto Agility3
if %choice%==4 goto Agility4
if %choice%==5 goto Agility5
goto StrengthPoint
:AgilityTaken
echo Sorry, that skill level is taken by another skill.
echo.
pause
goto AgilityPoint
:Agility1
SET /a Agility=1
if %Stregth%==1 goto AgilityTaken
if %Agility%==1 goto AgilityTaken
if %Archery%==1 goto AgilityTaken
if %Persuasion%==1 goto AgilityTaken
if %Intelligence%==1 goto AgilityTaken
goto Smartpoint
:Agility2
if %Stregth%==2 goto AgilityTaken
if %Agility%==2 goto AgilityTaken
if %Archery%==2 goto AgilityTaken
if %Persuasion%==2 goto AgilityTaken
if %Intelligence%==2 goto AgilityTaken
SET /a Agility=2
goto Smartpoint
:Agility3
if %Stregth%==3 goto AgilityTaken
if %Agility%==3 goto AgilityTaken
if %Archery%==3 goto Agilityaken
if %Persuasion%==3 goto AgilityTaken
if %Intelligence%==3 goto AgilityTaken
SET /a Agility=3
goto Smartpoint
:Agility4
if %Stregth%==4 goto AgilityTaken
if %Agility%==4 goto AgilityTaken
if %Archery%==4 goto AgilityTaken
if %Persuasion%==4 goto AgilityTaken
if %Intelligence%==4 goto AgilityTaken
SET /a Agility=4
goto Smartpoint
:Agility5
if %Stregth%==5 goto AgilityTaken
if %Agility%==5 goto AgilityTaken
if %Archery%==5 goto AgilityTaken
if %Persuasion%==5 goto AgilityTaken
if %Intelligence%==5 goto AgilityTaken
SET /a Agility=5
goto Smartpoint
:Smartpoint
cls
echo This might be a good time to ask, how smart are you?
echo Note that you have 5 skills, Strength, Agility, Intelligence, Archery, and Persuasion.
echo Each skill can be positioned on a meter of 5 levels. If you set strength to level 5, nothing else can be level 5.
echo Once a level for a skill has been set, it cannot be changed, or have anything else at the same level.
echo.
echo Intelligence decides how well you think, and how smart you are.
echo Choose wisely.
echo.
echo 1.) I am Level 1
echo.
echo 2.) I am Level 2
echo.
echo 3.) I am Level 3
echo.
echo 4.) I am Level 4
echo.
echo 5.) I am Level 5
echo.
SET /p choice= Your Intelligence level is :
if %choice%==1 goto Intelligence1
if %choice%==2 goto Intelligence2
if %choice%==3 goto Intelligence3
if %choice%==4 goto Intelligence4
if %choice%==5 goto Intelligence5
goto StrengthPoint
:IntelligenceTaken
echo Sorry, that skill level is taken by another skill.
echo.
pause
goto IntelligencePoint
:Intelligence1
SET /a Intelligence=1
if %Stregth%==1 goto IntelligenceTaken
if %Intelligence%==1 goto IntelligenceTaken
if %Archery%==1 goto IntelligenceTaken
if %Persuasion%==1 goto IntelligenceTaken
if %Intelligence%==1 goto IntelligenceTaken
goto PersPoint
:Intelligence2
if %Stregth%==2 goto IntelligenceTaken
if %Intelligence%==2 goto IntelligenceTaken
if %Archery%==2 goto IntelligenceTaken
if %Persuasion%==2 goto IntelligenceTaken
if %Intelligence%==2 goto IntelligenceTaken
SET /a Intelligence=2
goto PersPoint
:Intelligence3
if %Stregth%==3 goto IntelligenceTaken
if %Intelligence%==3 goto IntelligenceTaken
if %Archery%==3 goto Intelligenceaken
if %Persuasion%==3 goto IntelligenceTaken
if %Intelligence%==3 goto IntelligenceTaken
SET /a Intelligence=3
goto PersPoint
:Intelligence4
if %Stregth%==4 goto IntelligenceTaken
if %Intelligence%==4 goto IntelligenceTaken
if %Archery%==4 goto IntelligenceTaken
if %Persuasion%==4 goto IntelligenceTaken
if %Intelligence%==4 goto IntelligenceTaken
SET /a Intelligence=4
goto PersPoint
:Intelligence5
if %Stregth%==5 goto IntelligenceTaken
if %Intelligence%==5 goto IntelligenceTaken
if %Archery%==5 goto IntelligenceTaken
if %Persuasion%==5 goto IntelligenceTaken
if %Intelligence%==5 goto IntelligenceTaken
SET /a Intelligence=5
goto PersPoint
:PersPoint
cls
echo This might be a good time to ask, how good at Persuasion are you?
echo Note that you have 5 skills, Strength, Agility, Persuasion, Archery, and Persuasion.
echo Each skill can be positioned on a meter of 5 levels. If you set strength to level 5, nothing else can be level 5.
echo Once a level for a skill has been set, it cannot be changed, or have anything else at the same level.
echo.
echo Persuasion decides how well you think, and how smart you are.
echo Choose wisely.
echo.
echo 1.) I am Level 1
echo.
echo 2.) I am Level 2
echo.
echo 3.) I am Level 3
echo.
echo 4.) I am Level 4
echo.
echo 5.) I am Level 5
echo.
SET /p choice= Your Persuasion level is :
if %choice%==1 goto Persuasion1
if %choice%==2 goto Persuasion2
if %choice%==3 goto Persuasion3
if %choice%==4 goto Persuasion4
if %choice%==5 goto Persuasion5
goto StrengthPoint
:PersuasionTaken
echo Sorry, that skill level is taken by another skill.
echo.
pause
goto PersuasionPoint
:Persuasion1
SET /a Persuasion=1
if %Stregth%==1 goto PersuasionTaken
if %Persuasion%==1 goto PersuasionTaken
if %Archery%==1 goto PersuasionTaken
if %Persuasion%==1 goto PersuasionTaken
if %Persuasion%==1 goto PersuasionTaken
goto GoBack
:Persuasion2
if %Stregth%==2 goto PersuasionTaken
if %Persuasion%==2 goto PersuasionTaken
if %Archery%==2 goto PersuasionTaken
if %Persuasion%==2 goto PersuasionTaken
if %Persuasion%==2 goto PersuasionTaken
SET /a Persuasion=2
goto GoBack
:Persuasion3
if %Stregth%==3 goto PersuasionTaken
if %Persuasion%==3 goto PersuasionTaken
if %Archery%==3 goto Persuasionaken
if %Persuasion%==3 goto PersuasionTaken
if %Persuasion%==3 goto PersuasionTaken
SET /a Persuasion=3
goto GoBack
:Persuasion4
if %Stregth%==4 goto PersuasionTaken
if %Persuasion%==4 goto PersuasionTaken
if %Archery%==4 goto PersuasionTaken
if %Persuasion%==4 goto PersuasionTaken
if %Persuasion%==4 goto PersuasionTaken
SET /a Persuasion=4
goto GoBack
:Persuasion5
if %Stregth%==5 goto PersuasionTaken
if %Persuasion%==5 goto PersuasionTaken
if %Archery%==5 goto PersuasionTaken
if %Persuasion%==5 goto PersuasionTaken
if %Persuasion%==5 goto PersuasionTaken
SET /a Persuasion=5
goto GoBack
Help would be greatly appreciated.
I am aware Batch is a limited language.