所以我希望它不显示它正在ping,只是它是否正在运行。我的代码没有按照我的意愿做:
@echo off
:start
ping 188.138.32.53 -n 1
if %errorlevel% == 1 (
goto :fail
) else (
cls
echo The MTG SAMP Server is up and running!
pause
goto :troubleshooting
)
:fail
cls
echo The MTG SAMP Server is currently down, please be patient...
goto :start
它清除屏幕,只在运行时说,但当它不运行时,它会显示 ping 状态。为什么是这样?