I'm writing something in BATCH and I need to use GOTO's but instead of going to the correct GOTO it goes to the next label/class rather then the right one.
I've tried using it without a colon but still can't get a solution.
@echo off
title Nexus Generator
color 0a
goto :signin
:signin
echo =====================================
echo Welcome to NEXUS GENERATOR!
echo Please enter your KEY!
echo =====================================
set /p id="Enter Key: "
if %id% == "Test" then goto :signedin else goto :error
:error
echo uh lol
:signedin
cls
echo lol
pause >nul
I expect that when TEST is entered it will go to signedin, and when anything else is entered it will go to error.