Posted 23 August 2013 - 05:04 PM
Sorry if i do something wrong, this is my first topic.
So, i wanted to make a password for a computer, and here is the code:
os.pullEvent = os.pullEventRaw
while true do
term.clear()
term.setCursorPos(1, 1)
print "Mrpoopy Security. Please enter password:"
input = read("*")
if input == "password" then
print "Access granted"
sleep(1)
term.clear()
print "CraftOS 1.5"
break
else
print "Incorrect."
sleep(1)
term.clear()
print "Locked."
sleep(20)
os.reboot()
end
end
But when it prints "CraftOS 1.5" or "Locked" They show up on the fourth line of the screen!
Help!
Thank you.
So, i wanted to make a password for a computer, and here is the code:
os.pullEvent = os.pullEventRaw
while true do
term.clear()
term.setCursorPos(1, 1)
print "Mrpoopy Security. Please enter password:"
input = read("*")
if input == "password" then
print "Access granted"
sleep(1)
term.clear()
print "CraftOS 1.5"
break
else
print "Incorrect."
sleep(1)
term.clear()
print "Locked."
sleep(20)
os.reboot()
end
end
But when it prints "CraftOS 1.5" or "Locked" They show up on the fourth line of the screen!
Help!
Thank you.