だから私はこのミニテキストゲームを作っていました。私はそれを実行しようとするたびにファイルが始まります:戦いではなく:スタートは本当に迷惑で、一度そこに着くと、戦闘または実行のオプションを選択することはできません。助けてください。そして、ゲームを判断してはいけません。ありがとうございます。私のバッチゲームは始まらない
@echo off
title: My game!
color 0a
:loop
echo My game!
cls
goto Start
:Start
cls color 3c
echo Hello welcome to my game If this works.....
cls
echo before you start the game make sure that you turned of the hair curler,
echo didnt leave your keys in the car and locked the front door, and THEN you have to make
echo sure that you ARE READY
cls
color 0c
echo WHAT ARE YOU DOING HERE!?!
echo Get out!
color 09
echo A giant monster aproaches you, you dont stop to see what it is chasing you.
color 0c
echo Im gonna demolish you!!
cls
color 09
echo you stop running, the monster is far behind you.You look around and you are in
echo some kind of dungeon
echo then you start to wonder if you could actually try and fight this thing!
cls
color 09
echo Options
echo 1 try and fight this darn thing!
echo 2 keep running
set /p y=
if %% == 1 goto fight
if %% == 2 goto run
:fight
cls
color 09
echo suddenly you find a pocket nife in your cargo jeans! Very conveniant am i right?
echo so you run up to the monster and slay it!
goto scene two
:run
echo youtire quickly and the monster catches up and swiftly kills you
goto GAME OVER
:GAME OVER
wow nice job you managed to die on the first level
echo Options
echo 1 Try again!
echo 2 Be a wuss and quit
set /p y=
if %% == 1 goto Start
if %% == 2 goto quitter
:quitter
cls
color 09
echo Nice job quitter.
:scene two
color 09
echo wow nice job!
echo so far you have done a nice job!
もし 'if %% == 1'が'%y%== 1'( '2'でも)を読み込むべきです...これらの' if'行の後に、ユーザが他の何かを入力した時'1/2'より... – aschipfl
' choice/c12'は1または2を入力することしかできません。 'Choice /? 'を参照してください。 'エラーレベル2でなければエラーレベル1を、'エラーレベル2でなければエラーレベル2を選択してエコー2を選択 'をテストする。 –
その人たちのために、この種のものにはかなり新しいです、そしてこれを実行しようとすると、私はまっすぐに行きます:コード2のバグか、それとも間違っているのかシーン2。 – king1928