简体   繁体   English

此时,后藤出人意料

[英]Goto was unexpected at this time please

im messing around for a secret file that i can type in and just keep things to myself here is the code 我正在找一个我可以输入的秘密文件,只是把东西留给自己,这里是代码

@echo off
echo PLEASE ENTER THE PASSWORD TO CONTINUE
set /p password="hello"
IF %c%==hello goto top
IF NOT %c%==goto PASSERROR
:passsuccess
title matrix
color 0a
mode 1000
:top
echo %random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%
goto top
:passerror
echo try again

Your problem is that c is undefined. 您的问题是c未定义。 You are entering the password into password then checking c . 您正在将密码输入password然后选中c

In case of spaces or no entry, use 如果有空格或没有条目,请使用

if "%varentered%"=="somevalue" goto ...

For instance, 例如,

if "%c%"=="" goto paserror

or 要么

if not defined c goto ...

as you have it, if %c% is not equal to goto , execute the executable passerror 如您passerror ,如果%c%不等于goto ,则执行可执行文件passerror

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM