LESS 和 GREA excetra if 命令出现问题

Trouble with LESS and GREA excetra if commands

我已经解决了我之前的问题,但在编辑之后,我开始添加一些行。这应该询问年龄,对我有用的是 EQU,而不是 LESS 或 GREA;所以只有 "No" 有效。其他一切= "The syntax of the code is wrong." 不过,感谢您之前的帮助!甚至可能是这个。 我懒得在我所有代码的开头添加 4 行 顺便说一下,有什么提示可以帮助我更快地完成它:

:Next1
echo You know, %name%, I just really cannot differ how old  you are. I would       love to know. Do not hesitate to say "No" if  you would not really like to  tell me, but I would like to know.
set /p age
if /i  "%age%" EQU "No" goto :NoAge
if /i "%age%" LESS 12 goto :Young
if /i "%age%" GREA 12 goto :Older
:Older
if /i "%age%" LESS 18 goto :Teen
goto :Adult
:Young
echo Oh, so you are quite young, are you! Well, that is ok, we can still have a little chat!
set "%age%" Young
:Teen
Oh, a teenager... I AIN'T MESSIN' WIT' YOU!
pause
end
:Adult
echo Ah, a good old adult. Lovely!
set "%age%" Older
goto :Next2
:NoAge
echo Well, that is ok (as I did say!) So, do not worry!
goto :Next2
:Next2
pause

这里有一些变化,在继续你的项目之前你确实需要做一些阅读。

:Next1
echo You know, %name%, I just really cannot tell how old you are.
echo Do not hesitate to say "No" if you would not really like to tell me,
set /p "age=but I would like to know. "
if /i "%age%" EQU "No" goto :NoAge
if "%age%" LSS "12" goto :Young
if "%age%" GTR "12" goto :Older
goto :Next1
:Older
if "%age%" LSS "18" goto :Teen
goto :Adult
:Young
echo Oh, so you are quite young, are you!
echo Well, that is ok, we can still have a little chat!
set "age=Young"

:Teen
Oh, a teenager... I AIN'T MESSIN' WIT' YOU!
pause
exit
:Adult
echo Ah, a good old adult. Lovely!
set "age=Older"
goto :Next2
:NoAge
echo Well, that is ok (as I did say!) So, do not worry!
goto :Next2
:Next2
if /i "%age%" EQU "Young" goto :Young-next2
goto :Adult-next2
:Young-next2
echo Young %name%, would you like to play a game of rock, paper, scissors? (Y/N)
set /p "RPS=Y/N "
if /i "%RPS%" EQU "Y" goto :Yes
if /i "%RPS%" EQU "N" goto :No
goto :Young-next2

您需要在空白行填写一些内容,可能是一个 goto,具体取决于您将如何进行聊天。如果您不这样做,代码将直接进入 :Teen 标签。