Posted 04 January 2013 - 04:39 AM
hello,
yesterday i posted a topic too.. and i have been helped and i did what they say what to do so i did that and im now back again.
there is a error in the code
it is a login system! i want to add premissions to it but dont know how can anybody help me with that?
the error is:
bios:206: [string "login.txt"]:163: '<eof>' expected
code:
http://pastebin.com/pLjDXL8i
code:
yesterday i posted a topic too.. and i have been helped and i did what they say what to do so i did that and im now back again.
there is a error in the code
it is a login system! i want to add premissions to it but dont know how can anybody help me with that?
the error is:
bios:206: [string "login.txt"]:163: '<eof>' expected
code:
http://pastebin.com/pLjDXL8i
code:
Spoiler
os.pullEvent = os.pullEventRaw
term.clear()
term.setCursorPos(1,1)
print (" __ | __ | Login System ")
print (" || || _ \\ (_-< ")
print (" __// __// .\\___/ ___/ ")
print ("------------------(Version: 2.1)------------------")
print ("")
print ("Login: ")
print ("")
-- admin account
write ("Username: ")
username = read()
if username == "admin" then
sleep(0.5)
write ("Password: ")
password = read ("*")
if password == "adminbypass" then
sleep(1)
function loading()
term.setCursorPos(17,11)
term.clearLine()
print ("[ Loading ]")
sleep(0,5)
term.setCursorPos(17,11)
term.clearLine()
print ("[ Loading 16% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 31% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 46% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 62% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 78% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 93% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading Done ]")
sleep(2)
end
loading()
term.setCursorPos(17,11)
term.clearLine()
print ("Account Accepted.")
sleep(3)
term.clear()
term.setCursorPos(1,1)
print (" __ | __ | Welcome, "..username.."")
print (" || || _ \\ (_-< ")
print (" __// __// .\\___/ ___/ ")
print ("-----------------(Version: 2.1)-------------------")
print ("")
sleep(0.5)
else
loading()
sleep(2)
term.setCursorPos(11,11)
term.clearLine()
textutils.slowPrint ("Username and Password do not match")
sleep(3)
os.reboot()
end
-- jumpingjoran account
username = read()
elseif username == "jumpingjoran" then
sleep(0.5)
write ("Password: ")
password = read ("*")
elseif password == "jumpingjoran" then
sleep(1)
function loading()
term.setCursorPos(17,11)
term.clearLine()
print ("[ Loading ]")
sleep(0,5)
term.setCursorPos(17,11)
term.clearLine()
print ("[ Loading 16% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 31% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 46% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 62% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 78% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 93% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading Done ]")
sleep(2)
end
loading()
term.setCursorPos(17,11)
term.clearLine()
print ("Account Accepted.")
sleep(3)
term.clear()
term.setCursorPos(1,1)
print (" __ | __ | Welcome, "..username.."")
print (" || || _ \\ (_-< ")
print (" __// __// .\\___/ ___/ ")
print ("-----------------(Version: 2.1)-------------------")
print ("")
sleep(0.5)
else
loading()
sleep(2)
term.setCursorPos(11,11)
term.clearLine()
textutils.slowPrint ("Username and Password do not match")
sleep(3)
os.reboot()
end
-- mastermy2 account
username = read()
elseif username == "mastermy2" then
sleep(0.5)
write ("Password: ")
password = read ("*")
if password == "mastermy2" then
sleep(1)
function loading()
term.setCursorPos(17,11)
term.clearLine()
print ("[ Loading ]")
sleep(0,5)
term.setCursorPos(17,11)
term.clearLine()
print ("[ Loading 16% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 31% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 46% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 62% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 78% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading 93% ]")
term.setCursorPos(17,11)
term.clearLine()
sleep(0,5)
print ("[ Loading Done ]")
sleep(2)
end
loading()
term.setCursorPos(17,11)
term.clearLine()
print ("Account Accepted.")
sleep(3)
term.clear()
term.setCursorPos(1,1)
print (" __ | __ | Welcome, "..username.."")
print (" || || _ \\ (_-< ")
print (" __// __// .\\___/ ___/ ")
print ("-----------------(Version: 2.1)-------------------")
print ("")
sleep(0.5)
else
loading()
sleep(2)
term.setCursorPos(11,11)
term.clearLine()
textutils.slowPrint ("Username and Password do not match")
sleep(3)
os.reboot()
end
else
sleep(1)
print ("Username not found.")
sleep(1)
os.reboot()
end