Posted 26 June 2012 - 07:08 PM
Hello
I just started learning to work with computer craft and LUA script today.
I have previous experience with several scripts and stuff but I was working on this simple program to retract some sticky pistons using a password system. When I try to run the program I get an error that says bios:206: [string "lock"] :9: '=' expected and I dont have the slightest clue what this means. The word lock is no where in the script so i thought id change the program name to 'password' and then i got bios:206: [string "password"] :9: '=' expected.
I just need assistance knowing what the problem is.
Pass=cowfence
write "Good Day, Mason!"
write "Please enter the password"
input=read()
if
input==pass
then
term.clear
term.setcursorpos(1,1)
print "Access Granted…!"
rs.setoutput("Back,True")
os.shutdown
else
term.clear
term.setcursorpos(1,1)
Write "PASSWORD INCORRECT"
Sleep(2)
term.clear
term.sercursorpos(1,1)
Write "Shutting down…
Sleep (2)
os.shutdown
end
I just started learning to work with computer craft and LUA script today.
I have previous experience with several scripts and stuff but I was working on this simple program to retract some sticky pistons using a password system. When I try to run the program I get an error that says bios:206: [string "lock"] :9: '=' expected and I dont have the slightest clue what this means. The word lock is no where in the script so i thought id change the program name to 'password' and then i got bios:206: [string "password"] :9: '=' expected.
I just need assistance knowing what the problem is.
Pass=cowfence
write "Good Day, Mason!"
write "Please enter the password"
input=read()
if
input==pass
then
term.clear
term.setcursorpos(1,1)
print "Access Granted…!"
rs.setoutput("Back,True")
os.shutdown
else
term.clear
term.setcursorpos(1,1)
Write "PASSWORD INCORRECT"
Sleep(2)
term.clear
term.sercursorpos(1,1)
Write "Shutting down…
Sleep (2)
os.shutdown
end