else statement wont work crashes

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
mannyfanny101
Posts: 1
Joined: 02 Jun 2016 15:20

else statement wont work crashes

#1 Post by mannyfanny101 » 02 Jun 2016 15:30

@echo off
set /p num=whats the password:


if %num%==123 (
pause
color A
mode 1000

:matrix
echo 010101%random%01001010%random%01010100101101­%random%01010100%random%01001010%random%01001010%random%01001010%random%01001010%random%01001010%random%01001010%random%01001010%random%­%random%%random%01001010%random%01001010%random%01001010%random%01001010%random%01001010%random% %random%01001010%random%01001010%random%01001010%random%01001010%random%01001010%random%01001010%random%0100101001%random%01001010%random%01001010%random%101001010%random%01001010%random%01001010%random%01001010%random%%random%­%random%01001010%random%01001010%random%01001010%random%0100101001001010
goto matrix

) ELSE(
echo NO
pause
)

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: else statement wont work crashes

#2 Post by Squashman » 02 Jun 2016 21:02

Because you do not have a space between the ELSE and the parentheses.

Post Reply