Posted 27 December 2012 - 06:49 PM
rednet.open("top")
function getColor()
if redstone.testBundledInput("left", colors.white) == true then
color = "white"
elseif redstone.testBundledInput("left", colors.lightBlue) == true then
color = "lightBlue"
elseif redstone.testBundledInput("left", colors.yellow) == true then
color = "yellow"
elseif redstone.testBundledInput("left", colors.magenta) == true then
color = "magenta"
elseif redstone.testBundledInput("left", colors.purple) == true then
color = "purple"
elseif redstone.testBundledInput("left", colors.lime) == true then
color = "lime"
elseif redstone.testBundledInput("left", colors.orange) == true then
color = "orange"
elseif redstone.testBundledInput("left", colors.red) == true then
color = "red"
elseif redstone.testBundledInput("left", colors.pink) == true then
color = "pink"
end
end
function getReading()
local senderId, message, distance = rednet.receive()
color = message
end
function getTrueColor()
if color == "white" then
trueColor = 1
elseif color == "lightBlue" then
trueColor = 8
elseif color == "yellow" then
trueColor = 16
elseif color == "magenta" then
trueColor = 4
elseif color == "purple" then
trueColor = 1024
elseif color == "lime" then
trueColor = 32
elseif color == "orange" then
trueColor = 2
elseif color == "red" then
trueColor = 16384
elseif color == "pink" then
trueColor = 64
end
redstone.setBundledOutput("right", trueColor)
end
while true do
parallel.waitForAny(getColor(), getReading(), getTrueColor)
end
Can someone explain to me what is wrong with this code? it never turns on any output (I have not tried brodcasting it a message yet, just the wire inputs.)