ive encountered a glitch in a text-based RPG that i am working on. Everytime i answer set "dec2= A. Go to the forest B. Kill your crew members C. Look at the necklace "
Can someone tell me what i am doing wrong or atleast just correct the code?
:classChosen
echo Take care!
pause
set "dec1="
set /p "dec1= A. Punch her in the eyeball B. Go outside C. Kill yourself "
if not defined class goto :classChosen
if /i "%dec1%"=="A" ( REM DEC1
echo The guards catch you.
pause
echo The village has decided to execute you for turning the leaders daughter blind.
pause
:death1
echo You died.
echo You will now be transported back to time...
pause
goto :classChosen
pause
)
if /i "%dec1%"=="B" ( REM DEC1
echo You go outside
pause
echo You see your crew members awake
pause
echo They greet you and give you your old necklace.
pause
set "dec2="
:path2
set /p "dec2= A. Go to the forest B. Kill your crew members C. Look at the necklace "
if not defined dec2 goto path2
if /i "%dec2%"=="A" ( REM DEC2
echo You go to the forest
pause
echo You encounter a large wolf
pause
echo The wolf eats your face off and screams death metal.
pause
:death2
echo You will now be transported back in time.
pause
goto path2
)
if /i "%dec2%"=="B" ( REM DEC2
echo You killed your crew members.
echo Out of extreme depression of no friends, you decide to kill yourself.
pause
goto death2
)
if /i "%dec2%"=="C" ( REM DEC2
echo You look at your old necklace
pause
echo You see that somebody has engraved a marking on it but you dont know who.
pause
:path3
set "dec3="
set "dec3= A. Ask someone about the necklace B. Throw the necklace away C. Destroy the moon "
if not defined dec3 goto path3
goto path3
)
)
REM add path
)
if /i "%dec1%"=="C" ( REM DEC1
goto death1
)
REM add end last
REM :end
Here is the code, i really need to know what im doing wrong fast because this is my batch homework. Its like 12 AM and im confused on what i am doing wrong. This isnt the full game though, i just put in the code that need fixing.
Aucun commentaire:
Enregistrer un commentaire