Can you please help tell me what I did wrong in my if then loop? Thank you, and have a good day
Here’s the code (by the way,I’m using a microcontroller):
local rs = component.proxy(component.list(“redstone”)())
Local wr = component.proxy(component.list(“modem”)())
wr.open(2110)
local x,w,a,d,f,sent = computer.pullSignal()
rs.setOutput(3,100)
#output to front
while true do
if sent = “enon” then
rs.setOutput(3,100)
elseif sent = “enoff” then
rs.setOutput(3,0)
elseif computer.energy() < 150 then
rs.setOutput(3,0)