You are not logged in.

#1 14 Aug 2016 04:11

Joey2bost
Member
Registered: 27 Mar 2016
Posts: 22

Goto comes up unreconized

i am trying to have if if the variable is not equal to what was set then it would goto failedlogin but i keep getting "'failedlogin' is unreconized"

here is the code i used, please help:

:login
< travelsave.sav (
set /p %NickName%=
set /p %Password%=
set /p %Email%=
)

cls
echo ////////////
echo Login
echo ///////////
echo.
::Rearrange the variables and names    ::Done
echo //////////////////////
set /p NickName_do= Username:
echo //////////////////////
set /p Password_do= Password:
echo //////////////////////
set /p Email_do= Email:
echo //////////////////////
echo.
echo Please make sure info above is okay
echo.
echo ///////
echo 1)Good
echo 2)Redo
echo 3)Menu
echo //////
set /p qo=

if %qo% == 1 goto check_user
if %qo% == 2 goto login
if %qo% == 3 goto begin
goto login

:check_user
cls
if %NickName_do% == %NickName% goto check_pass
if Not %NickName_do% == %NickName% goto failedlogin
goto check_user

:check_pass
cls
if %Password_do% == %Password% goto check_email
if Not %Password_do% == %Password% goto failedlogin
goto check_pass

:check_email
cls
if %Email_do% == %Email% goto main
if Not %Email_do% == %Email% goto failedlogin
goto check_email

:failedlogin
cls
echo Something you typed was inncorrect
echo Try agian
pause
cls
goto login

Offline

#2 15 Aug 2016 03:06

Shadow Thief
Member
Registered: 12 Jul 2012
Posts: 205

Re: Goto comes up unreconized

You're going to kick yourself...

The code you're using to get the values from travelsave.sav is incorrect. It should be

:login
< travelsave.sav (
set /p NickName=
set /p Password=
set /p Email=
)

Offline

#3 15 Aug 2016 14:15

Joey2bost
Member
Registered: 27 Mar 2016
Posts: 22

Re: Goto comes up unreconized

Shadow Thief wrote:

You're going to kick yourself...

The code you're using to get the values from travelsave.sav is incorrect. It should be

:login
< travelsave.sav (
set /p NickName=
set /p Password=
set /p Email=
)

Yup that fixed it, thank you!

Offline

Board footer

Powered by