Talk:Lua Tutorials/@comment-2225136-20120607233253/@comment-85.30.158.193-20120704184413

yes = y

no = n

print ("On? y/n")

answer = read

if answer == yes then

rs.setOutput("right", true)

print("On")

else

end

if answer == no then

rs.setOutput("right", false)

print("Off.")

else

print("Bad answer")

sleep(2)

end

os.shutdown

If I run it it says Bad answer no matter what I type.