Alright then Grog, write an alternative to this that doesn't use goto:
section_menu:
print "1. Login."
print "2. Register"
input "Please choose an option: ", option
if option = 1 then goto section_login
if option = 2 then goto section_register
goto section_menu
section_register:
print "--- REGISTER ---"
input "Username: ", username$
input "Password: ", password$
if Register(username$, password$)
print "Registered."
else
print "Failed to register."
endif
goto section_menu
section_login:
print "--- LOGIN ---"
input "Username: ", username$
input "Password: ", password$
if Login(username$, password$)
print "Logged in."
else
print "Failed to log in."
goto section_menu
endif
` Whatever comes next
Not that it's impossible, but..
Edit: Damn, it's too easy.
do
print "1. Login."
print "2. Register"
input "Please choose an option: ", option
if option = 1
print "--- LOGIN ---"
input "Username: ", username$
input "Password: ", password$
if Login(username$, password$)
print "Logged in."
exit
else
print "Failed to log in."
endif
endif
if option = 2
print "--- REGISTER ---"
input "Username: ", username$
input "Password: ", password$
if Register(username$, password$)
print "Registered."
else
print "Failed to register."
endif
endif
loop
` Whatever
There was some similar code I did a while back, and I just couldn't seem to find a suitable workaround for it. This obviously isn't it.