I am not pro or even close, maybe someone could tell me whats wrong with this code? or maybe even write it correctly and show me the difference.Trying to send a signal from one computer to another using rednet to turn on redstone machines. Searched the internet for hours looking for an answer but nothing.
rednet.open ("top")
local event,p1,p2,p3 = os.pullEvent()
if event=="rednet_message" and p1==16 then
rednet.send(p1,p2,p3"ack")
if p2 == "m1 on" then
redset left false
elseif p2 == "m1 off" then
redset left true
elseif p2 == "m2 on" then
redset left false
elseif p2 == "m2 off" then
redset left true
end
end
end
this code would be on the receiving end of the command hooked to the redstone/wire