why doesnt this code work? its supposed to check if i previouly made a username and password then if i did go to login
if i didnt goto register
for some reason it always say i need to register even after i made an account what am i doing wrong
ps im adding sounds and fonts (make it look better) after i get this code workng so dont flame me on the apearance
set dir "C:"
make directory "Password Protect"
set dir "C:Password Protect"
usercheck:
if file exist (username$ + ".txt") = 1 then goto passcheck
if file exist (username$ + ".txt") = 0 then goto register
passcheck:
if file exist (password$ + ".txt") = 1 then goto login
if file exist (password$ + ".txt") = 0 then goto register
register:
input "please enter a username:", username$
input "please enter a password:", password$
print " Continue?"
repeat
until inkey$() = "y" or inkey$() = "n"
if inkey$() = "y" then goto save
if inkey$() = "n" then goto programterminated
save:
open to write 1, username$ + ".txt"
open to write 2, password$ + ".txt"
print "Registration successful!"
print " In Order for these settings to take effect please logout and exit thank you"
login:
input "Please Print your User Name", username$
input "Please Print your Password", password$
if file exist (username$ + ".text") = 1 then goto usernamecorrect
print "incorrect username!! press any key to try again "
wait key
goto login
usernamecorrect:
if file exist (password$ + ".text") = 1 then goto passwordcorrect
print "Incorrect password!! press any key to try again"
wait key
goto login
passwordcorrect:
print "Congrats you passed!!"
wait 3000
end
programterminated:
input "Type login, register, or bye",options$
if options$ = login$ then goto login
if options$ = register$ then goto register
if options$ = bye$ then goto bye
print " Incorrect please spell exactly as shown!!"
wait key
goto programterminated
bye:
print "PROGRAM TERMINATED!!!"
wait 3000
end
please help thanks
if time is an illusion than you can give me five more minutes......
- th3 d@rk j0k3r