8 posts
Posted 29 December 2012 - 02:47 PM
os.pullEvent = os.pullEventRaw
print("X.OS door/bridge LOCK")
local password = ("olakase")
local devmode = ("devmode")
local salad = read("*")
if salad == password then
rs.setOutput("left",true)
rs.setOutput("back",true)
print("Please press enter to close door and drop bridge")
write("")
read()
end
rs.setOutput("left",false)
rs.setOutput("back",false)
term.clear()
term.setCursorPos(1,1)
os.reboot()
im getting [lock:7]Attempt to call string Please help
1111 posts
Location
Portland OR
Posted 29 December 2012 - 03:08 PM
Try changing
local password = ("olakase")
local devmode = ("devmode")
--to
local password = "olakase"
local devmode = "devmode"
Also instead of doing the reboot you could just place the code in a loop
os.pullEvent = os.pullEventRaw
while true do
print("X.OS door/bridge LOCK")
local password = "olakase"
local devmode = "devmode"
local salad = read("*")
if salad == password then
rs.setOutput("left",true)
rs.setOutput("back",true)
print("Please press enter to close door and drop bridge")
write("")
read()
end
rs.setOutput("left",false)
rs.setOutput("back",false)
term.clear()
term.setCursorPos(1,1)
end
8 posts
Posted 29 December 2012 - 03:43 PM
thanks