Posted 16 September 2015 - 03:52 AM
Does anyone know why this code doesn't work?
It's original intention was to get a redstone signal from a redstone conduit in the form of a number, and read it and display something on a monitor based upon the results.
It's original intention was to get a redstone signal from a redstone conduit in the form of a number, and read it and display something on a monitor based upon the results.
mon = peripheral.wrap("back")
while true do
mon.clear()
mon.setCursorPos(1,1)
local x2,y2 = mon.getCursorPos()
local x,y = mon.getSize()
mon.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), math.ceil(y / 2))
mon.setTextScale(4)
if rs.getBundledInput("front") == 128 then
mon.write("Welcome Mohian!")
elseif rs.getBundledInput("front") == 256 then
mon.write("Welcome Farhan!")
elseif rs.getBundledInput("front") == 2048 then
mon.write("Welcome Evolutionary!")
else
if rs.getBundledInput("front") ~= 0 then
mon.write("Welcome Visitors!")
end
end
end