CODE
so far though every time that i run the monitor program the turtle just shows a black screen.'
it should allow me to just go about my business on the turtle after i run the command
Edited by shawnmick, 08 May 2015 - 12:36 AM.
Posted 07 May 2015 - 07:05 PM
Edited by shawnmick, 08 May 2015 - 12:36 AM.
Posted 11 May 2015 - 02:45 PM
rednet.open("right") for key, value in pairs(term) do if type(value) == "function" then term[key] = function(...) rednet.broadcast({key, {...}}) -- Broadcast only accepts one parameter, so if you want to send more than that, tables are handy. return value(...) end end end
rednet.open("right") local mon = peripheral.find("monitor") while true do local id, msg = rednet.receive() if type(msg) == "table" and mon[msg[1]] then -- If the message is a table, and the first index holds a valid monitor function, then... mon[msg[1]](unpack(msg[2])) end end
Posted 11 May 2015 - 08:18 PM
Posted 12 May 2015 - 07:47 AM
Edited by shawnmick, 12 May 2015 - 08:51 PM.
Posted 13 May 2015 - 01:54 AM
0 members, 1 guests, 0 anonymous users