Posted 26 August 2012 - 09:50 AM
Here is my code:
input=redstone.getInput("back")
if input =="false" then
write="Do you want to turn lights on?"
local YesOrNo = read()
if YesOrNo =="yes" then
rs.setOutput("back", true)
end
if YesOrNo =="no" then
end
elseif input =="true" then
write="Do you want to turn lights off?
local YesOrNo2 = read()
if YesOrNo2 =="yes" then
rs.setOutput("back", false)
if YesOrNo2 =="no" then
end
end
end
when i run the program it doesn't write anything any help?
It's to control a light switch
input=redstone.getInput("back")
if input =="false" then
write="Do you want to turn lights on?"
local YesOrNo = read()
if YesOrNo =="yes" then
rs.setOutput("back", true)
end
if YesOrNo =="no" then
end
elseif input =="true" then
write="Do you want to turn lights off?
local YesOrNo2 = read()
if YesOrNo2 =="yes" then
rs.setOutput("back", false)
if YesOrNo2 =="no" then
end
end
end
when i run the program it doesn't write anything any help?
It's to control a light switch