This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
alexpotter1's profile picture

[Lua] Program quits if wrong username/password is entered (Login system)

Started by alexpotter1, 29 June 2012 - 10:02 PM
alexpotter1 #1
Posted 30 June 2012 - 12:02 AM
Hello,
I am trying to make a basic login system for my basic OS that I am trying to make. Users will be able to change their logon details and the system will write it to a file. The logon script I have created seems to read the file and get the username and password from it, but if something else is entered at the prompt to login (not the correct user/pass combination), the program quits however if the correct combination is entered, the program goes to the desktop. :/

I have been looking at it for a while now and I am still not sure why it does this.

Code:
http://pastebin.com/FZczc6gu

Any help would be appreciated :P/>/>

Alex
alexpotter1 #2
Posted 30 June 2012 - 12:28 AM
Nevermind guys, got it working.

Turns out, I had to put the username and password variables into a table and then use the table!

:P/>/>