Jump to content




Title: Door lock is not working?

help lua computer

  • You cannot reply to this topic
3 replies to this topic

#1 Dahknee

  • Members
  • 1,808 posts
  • Location/home/da

Posted 13 April 2013 - 06:43 AM

My simple door lock program keeps making an error, what am I missing?!
The Door Lock Code:
term.clear()
term.setCursorPos(1,1)
password = "nothing"
print [[
Danny's House (Emergency Entrance)
----------------------------------------------
Please enter password:
]]
sleep(1)
input = read("*")
if input == password then
  textutil.slowPrint("Verrifying Password..........")
  print("Password Accepted!")
  sleep(2)
  print("Access Granted for 8 Seconds")
  rs.setOutput("back",true)
  sleep(8)
  rs.setOutput("back",false)
  os.shutdown()
else
  textutils.slowPrint("Verrifying Password..........")
  print("Password Denied!")
  sleep(2)
  os.shutdown()
end

the error:
bios:338: [string "startup"]:16: unfinished string


#2 SadKingBilly

  • Members
  • 160 posts

Posted 13 April 2013 - 06:58 AM

textutil.slowPrint("Verifying Password....") on line 12 should be textutils.slowPrint("Verifying Password....")

#3 Dahknee

  • Members
  • 1,808 posts
  • Location/home/da

Posted 13 April 2013 - 07:08 AM

View PostTheCoryKid, on 13 April 2013 - 06:58 AM, said:

textutil.slowPrint("Verifying Password....") on line 12 should be textutils.slowPrint("Verifying Password....")

did that still doesn't work....

#4 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 13 April 2013 - 07:08 AM

you might also want to put this on the top:
local oldPull=os.pullEvent
os.pullEvent=os.pullEventRaw
and this on the bottom
os.pullEvent=oldPull
to prevent ctrl-t

EDIT:

View PostDannySMc, on 13 April 2013 - 07:08 AM, said:

View PostTheCoryKid, on 13 April 2013 - 06:58 AM, said:

textutil.slowPrint("Verifying Password....") on line 12 should be textutils.slowPrint("Verifying Password....")

did that still doesn't work....
what is the error?
and give us the full code
because theres nothing on line 16 to make a unfinished string error :(





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users