Code: Select all
:DECLARE_UNLOCK
cls
set i=0
set y=0
for /F "tokens=*" %%A in (%USERPROFILE%\fields.txt) do (
SET /A i+=1
set field!i!=%%A
)
for /F "tokens=*" %%A in (%USERPROFILE%\fieldtype.txt) do (
SET /A y+=1
set fieldtype!y!=%%A
)
set x=0
set y=1
set i=0
goto UNLOCK
:UNLOCK
cls
if %i%==%numberofields% goto SHOW_FOLDER
set /a y+=1
set /a i+=1
if !fieldtype%y%!==1 (
set /p enter%y%=Enter your name:
if !enter%y%!==!field%i%! goto UNLOCK
goto INTRUDER
)
I'm pretty sure the problem is the IF statement (I'm not 100% sure because there's no error). It's almost like it's skipping the IF, even though I know that the
Code: Select all
!fieldtype%y%!==1
Code: Select all
setlocal EnableDelayedExpansion and EnableExtansions