这批选项我怎么了

问题描述 投票:0回答:0

当我尝试选择

1
2
时,它只是转到错误消息,而没有运行任何一个
goto
命令。不管我用什么回答都好像切到了页面底部

@echo off
cls
goto 0.1.0.1

:0.1.0.1
echo There are many myths and legends surrounding the black forest.
echo Its Inhabitants seek to help or hinder any who foolishly enter
echo ========================================================================================  
echo You have entered the forest. It does not matter why. All find their way here eventually.
echo Shall we proceed?
echo \[ 1: Yes \]
echo \[ 2: No  \]
set /p C0.1.0.1=Your Decision:

if %C0.1.0.1%=="1" goto 0.1.1.1
if %C0.1.0.1%=="2" goto 0.0.0.0

cls
echo error
goto 0.1.0.1

我已经多次尝试重新配置

if
语句。它要么崩溃,要么出错。

(注意:它有更多的代码,我不得不裁剪它。)

if-statement batch-file
© www.soinside.com 2019 - 2024. All rights reserved.