Where i am doing mistake in this script?
My basic script quiz game... i am new
problem: i made it myself.. saved it as .bat (made with notepad++) now when i execute it first section comes (:MENU) one. when i press 1 and press enter bang in suddenly closes off!.. sorry for bad english please help!
script:
@echo off
:MENU
echo This is my first game ever
echo press 1 to start
set/p=Command:
if %input%===1 goto :L1
:L1
echo lemon have____Test
echo 1:bitter 2:sweet :****
set/p=Command:
if %input%===1 goto :L2
if %input%===2 goto :FAIL
if %input%===3 goto :FAIL
:L2
echo facebook was made by?
echo 1)m. zukerberg 2)Steve Jobs 3)M.duckerberg
set/p=Command
if %input%===1 goto :WIN
if %input%===2 goto :FAIL
if %input%===3 goto :FAIL
:WIN
echo yay you won press 1 to restart
set/p=Command
if %input%===1 goto :L1
:FAIL
echo lol you failed press 1 to restart
set/p=Command:
if %input%===1 goto :L1
the problem was
this error: goto was unecpected at the time
solution was: if %input%===1 goto :WIN
changed it to if %input% '==' goto :WIN
and it works perfectly now thank you :)