Posted 09 February 2013 - 10:34 PM
Hey Guys Im Having a little trouble with my program
Im Getting a "bios:338: [string "startup"]:20: syntax error" with the following code:
rednet.open("top")
while true do
term.clear()
term.setCursorPos(2,1)
write("Please Enter The Password")
term.setCursorPos(2,2)
write("Password: ")
password = read("*")
if password == "minecraft" then
term.clear()
term.setCursorPos(2,1)
write("Welcome Illya")
term.setCursorPos(2,2)
write("Please Enter A Command")
term.setCursorPos(2,3)
write("Command: ")
command = read()
if command == "Open" then
id, rednet.broadcast("open")
term.setCursorPos(2,4)
write("Opened")
end
if command == "Close" then
id, rednet.broadcast("close")
term.setCursorPos(2,4)
write("Closed")
end
if not password == "minecraft" then
term.clear()
term.setCursorPos(2,1)
write("ACCESS DENIED")
term.setCursorPos(2,2)
write("INITIATING LOCKDOWN SEQUENCE")
sleep(60)
end
end
The Error is on Line 20 according to Minecraft:
[img]C:\Users\Sebel\Desktop\Untitled.png[/img]
Thanks for the help
Im Getting a "bios:338: [string "startup"]:20: syntax error" with the following code:
rednet.open("top")
while true do
term.clear()
term.setCursorPos(2,1)
write("Please Enter The Password")
term.setCursorPos(2,2)
write("Password: ")
password = read("*")
if password == "minecraft" then
term.clear()
term.setCursorPos(2,1)
write("Welcome Illya")
term.setCursorPos(2,2)
write("Please Enter A Command")
term.setCursorPos(2,3)
write("Command: ")
command = read()
if command == "Open" then
id, rednet.broadcast("open")
term.setCursorPos(2,4)
write("Opened")
end
if command == "Close" then
id, rednet.broadcast("close")
term.setCursorPos(2,4)
write("Closed")
end
if not password == "minecraft" then
term.clear()
term.setCursorPos(2,1)
write("ACCESS DENIED")
term.setCursorPos(2,2)
write("INITIATING LOCKDOWN SEQUENCE")
sleep(60)
end
end
The Error is on Line 20 according to Minecraft:
[img]C:\Users\Sebel\Desktop\Untitled.png[/img]
Thanks for the help