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

Help w/ password locked computer

Started by Fish_tacoz, 05 November 2012 - 02:30 PM
Fish_tacoz #1
Posted 05 November 2012 - 03:30 PM
I just started playing around with computercraft, and I seem to have hit a few speed bumps. Mainly, the error "bios:206: [string "startup"]:6: syntax error"

this is my code

oldPull = os.pullEvent
os.pullEvent = os.pullEventRaw
while true do
term.clear()
term.setCursorPos(1,1)
write ("Passcode")
if read ("*") == "Password" then
ptint ("Access Granted")
term.clear()
term.setCursorPos(1,1)
break
else
print ("Access Denied")
end
end
os.pullEvent = oldpull
ChaddJackson12 #2
Posted 05 November 2012 - 03:36 PM
Try taking out the spaces from write and print. So this:

write(" ")

Instead of this:

write (" ")

If that doesn't work then try changing around then try. changin the code to this:


write("Passcode: ")
pass = read("*")
if pass == "Password" then

Tell me how it works out.
PixelToast #3
Posted 05 November 2012 - 05:54 PM

oldPull = os.pullEvent
os.pullEvent = os.pullEventRaw
while true do
term.clear()
term.setCursorPos(1,1)
write ("Password: ")
if read("*") == "1234" then
print("Access Granted")
term.clear()
term.setCursorPos(1,1)
break
else
print("Access Denied")
end
end
os.pullEvent = oldpull
thar i fixed it
strideynet #4
Posted 05 November 2012 - 07:41 PM
Lol ptint?
PixelToast #5
Posted 05 November 2012 - 08:21 PM
Lol ptint?

fixed lol, sorry its like 1 AM and my hand eye coordination just farts
Fish_tacoz #6
Posted 30 December 2012 - 09:47 AM
Thanks Everyone