Posted 24 February 2012 - 08:51 PM
Hi I've been trying to make a couple of scripts using my 1 day of lua knowledge lol.
I can't FOR THE LIFE OF ME figure out why it won't work.
The error i am getting says
[string "disk/startup"]:25: '=' expected
This puzzles me because line 25 just says end, how can it be expecting a =?
i also had another code that i was having problems with
the error i am getting is
[string "startup"]:17: unexpected symbol
i also have another version that does not check the id and it works fine. the purpose of this code is to have a "news" broadcast system and the check for id part is to prevent people from sending a broadcast to people running this code with an unauthorized computer.
thanks :)/>/>
I can't FOR THE LIFE OF ME figure out why it won't work.
term.clear()
term.setCursorPos(1,1)
password = "qwerty"
write("Enter your password: ")
input = read()
term.clear()
term.setCursorPos(1,1)
if input == password then
print("Password correct. Door opening...")
sleep(1)
rs.setOutput("right",true)
sleep(2)
rs.setOutput("right",false)
os.shutdown()
else
print("Password incorrect. !!Alarm sounded!!")
rs.setOutput("left",true)
sleep(0.1)
rs.setOutput("left",false)
sleep(2)
os.shutdown
end
The error i am getting says
[string "disk/startup"]:25: '=' expected
This puzzles me because line 25 just says end, how can it be expecting a =?
i also had another code that i was having problems with
term.clear()
term.setCursorPos(1,1)
rednet.open( "top" )
while true do
event, id, message = os.pullEvent()
if event == "rednet_message" then
if id == 8 then
print("!!!ALERT!!!")
print(message)
print()
end
end
getInput( "left" ) = reset
if reset = 1 then
term.clear
end
end
the error i am getting is
[string "startup"]:17: unexpected symbol
i also have another version that does not check the id and it works fine. the purpose of this code is to have a "news" broadcast system and the check for id part is to prevent people from sending a broadcast to people running this code with an unauthorized computer.
thanks :)/>/>