0

我试图弄清楚如何编写一个批处理文件行,当玩家回答错误时给出正确答案。

这是我们正在做的游戏的第一行。

SET /p quest1= 1. What was the Six-Million-Dollar Man's first name?

4

2 回答 2

0
@echo off
set /p quest1=" 1. What was the Six-Million-Dollar man's first name? "
echo %quest1%|find /i "Steve">nul
if "%errorlevel%"=="0" (echo Right answer!) else (echo Incorrect answer, was Steve Austin.)
pause>nul
于 2013-10-04T02:14:58.280 回答
0

set /pa=what is 2 + 2:
if "%a%" NEQ "4" (echo sorry, 答案是 4)

于 2013-10-03T23:13:05.103 回答