Difference between revisions of "Talk:Making a Password Protected Door"
From ComputerCraft Wiki
(New talk page + topic) |
|||
| Line 2: | Line 2: | ||
== While true loop instead of functions == | == While true loop instead of functions == | ||
| + | <!-- | ||
| + | Please use correct formatting when adding comments. | ||
| + | --> | ||
We need a new picture tutorial, the current one should be using this code: | We need a new picture tutorial, the current one should be using this code: | ||
<pre> | <pre> | ||
Revision as of 02:52, 3 July 2012
While true loop instead of functions
We need a new picture tutorial, the current one should be using this code:
while true do
term.clear()
term.setCursorPos(1,1)
write("Password: ")
local t = read("*")
if t == "password" then
rs.setOutput("back", true)
sleep(2)
rs.setOutput("back", false)
else
end
end
(a few improvements, plus using a while true loop instead of calling a function over and over again (that crashes the computer after some time)