Posted 06 April 2012 - 01:17 PM
Hi all.
I try to program a night light get at the start but the following error:
bios :206: [string "nachtschalt.lua"]:32: unexpected symbol
Can somebody help please?
I try to program a night light get at the start but the following error:
bios :206: [string "nachtschalt.lua"]:32: unexpected symbol
while true do
term.clear()
term.setCursorPos(1,1)
local nTime = os.time()
taketime = textutils.formatTime(nTime,true)
test = string.find(taketime, ".0...")
found = "not found"
print(taketime)
while found == "not found" do
if string.find(taketime, loopc..":..") ~=nil then
found = loopc
break
else
loopc = loopc - 1
end
if loopc < 0 then
break
end
end
if found == 0 then
redstone.setOutput ("right",true)
elseif found == 1 then
redstone.setOutput ("right",true)
elseif found == 2 then
redstone.setOutput ("right",true)
elseif found == 3 then
redstone.setOutput ("right",true)
elseif found == 4 then
redstone.setOutput ("right",true)
elseif found == 5 then
redstone.setOutput ("right",true)
elseif found == 6 then
redstone.setOutput ("right",true)
elseif found == 7 then
redstone.setOutput ("right",false)
elseif found == 8 then
redstone.setOutput ("right",false)
elseif found == 9 then
redstone.setOutput ("right",false)
elseif found == 10 then
redstone.setOutput ("right",false)
elseif found == 11 then
redstone.setOutput ("right",false)
elseif found == 12 then
redstone.setOutput ("right",false)
elseif found == 13 then
redstone.setOutput ("right",false)
elseif found == 14 then
redstone.setOutput ("right",false)
elseif found == 15 then
redstone.setOutput ("right",false)
elseif found == 16 then
redstone.setOutput ("right",false)
elseif found == 17 then
redstone.setOutput ("right",false)
elseif found == 18 then
redstone.setOutput ("right",false)
elseif found == 19 then
redstone.setOutput ("right",true)
elseif found == 20 then
redstone.setOutput ("right",true)
elseif found == 21 then
redstone.setOutput ("right",true)
elseif found == 22 then
redstone.setOutput ("right",true)
elseif found == 23 then
redstone.setOutput ("right",true)
else
redstone.setOutput ("right",false)
redstone.setOutput ("top",true)
end
print ("Timer aktiv")
sleep(5)
end
Can somebody help please?