was to use many computers under my house floor waiting for a redstone signal on top. They're pressure plates on top of every computer and when someone steps on it the computer sends a rednet code like for pos 1 it was "1Act" and 2 its was "2Act so on and so fourth to the main computer in my security room connected to a monitor. When the main computer get that "1Act" or "2Act" it highlights it in red on the 3 by 4 advanced monitor. everything works but my "While Loop" and my positions of "End" at the end of every piece of code. Soon this will be much larger than four blocks but I wanted to make sure it worked first!
PLEASE HELP ME!!
rednet.open("bottom") mon = peripheral.wrap("top") fPostC = 256 fPosC = 32768 while true do id, message = rednet.receive() if message == ("1Act") then mon.setCursorPos(1,1) mon.setBackgroundColor(fPosC) mon.setTextColor(fPostC) mon.write(" ") mon.setCursorPos(1,2) mon.write(" ") mon.setCursorPos(1,3) mon.write(" ") mon.setCursorPos(1,4) mon.write(" ") mon.setCursorPos(1,5) mon.write(" ") mon.setCursorPos(1,6) mon.write(" ") sleep(0.5) mon.clear() end elseif message == ("2Act") then mon.setCursorPos(1,1) mon.setBackgroundColor(fPosC) mon.setTextColor(fPostC) mon.write(" ") mon.setCursorPos(10,2) mon.write(" ") mon.setCursorPos(10,3) mon.write(" ") mon.setCursorPos(10,4) mon.write(" ") mon.setCursorPos(10,5) mon.write(" ") mon.setCursorPos(10,6) mon.write(" ") sleep(0.5) mon.clear() end elseif message == ("3Act") then mon.setCursorPos(1,1) mon.setBackgroundColor(fPosC) mon.setTextColor(fPostC) mon.write(" ") mon.setCursorPos(20,2) mon.write(" ") mon.setCursorPos(20,3) mon.write(" ") mon.setCursorPos(20,4) mon.write(" ") mon.setCursorPos(20,5) mon.write(" ") mon.setCursorPos(20,6) mon.write(" ") sleep(0.5) mon.clear() end elseif == ("4Act") then mon.setCursorPos(30,1) mon.setBackgroundColor(fPosC) mon.setTextColor(fPostC) mon.write(" ") mon.setCursorPos(30,2) mon.write(" ") mon.setCursorPos(30,3) mon.write(" ") mon.setCursorPos(30,4) mon.write(" ") mon.setCursorPos(30,5) mon.write(" ") mon.setCursorPos(30,6) mon.write(" ") sleep(0.5) mon.clear() end end