Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

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

Update:

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 :)

1 Answer

Relevance
Still have questions? Get your answers by asking now.