Posted 23 September 2012 - 06:26 PM
I've rewritten and simplified my simple program for an hour now, but this problem still persists. I'm using a redstone event and checking the back redstone state to change the front redstone state and print the result. I know it must be obvious, but I can't see it.
The output print is doubled for either case.
term.clear()
term.setCursorPos(1,1)
event = 0
param1 = 0
while param1 ~= "q" do
event, param1 = os.pullEvent()
if event == "redstone" and redstone.getInput("back") == true then
redstone.setOutput("front", true)
print ("Front is now on.")
elseif event == "redstone" and redstone.getInput("back") == false then
redstone.setOutput("front", false)
print ("Front is now off.")
end
end
The output print is doubled for either case.