Posted 05 August 2012 - 09:58 PM
HI guys, I have recently gotten into computercraft with in tekkit and I am still a beginner at this and my friend asked me to write him a simple code where the computer outputs redstone power from the left side by default and can be turned on/off with a password. So i tried my hand at making the program and i got it to output the power and ask for the password but when i put the password in it does nothing at all and the output stays on. If you need anymore information please ask for it and thanks for the help if you do help
term.clear()
term.setCursorPos(1,1)
left = 1
right = 2
password = "off"
while left<right do
rs.setOutput("left", true)
term.clear()
term.setCursorPos(1,1)
print("Password: ")
a = read()
if a == password then
left = left + 2
end
end
Also here is the pastebin link if you want it http://pastebin.com/L4eVG8pJ