function monOutput(msg) term.redirect(peripheral.wrap(monSide)) term.clear() term.setCursorPos(1,1) term.print(pName) term.print(textutils.formatTime(os.time(),boolean)) term.print(msg) term.restore() end function output(msg) if monitor == 1 then monOutput(msg) else term.clear() term.setCursorPos(1,1) print(textutils.formatTime(os.time(), boolean)) print(msg) end end
I've had another look at the wiki and realised that I should be using p.callRemote(peripheral name, peripheral method) but I cannot work out how to use it in the above code. Do I have to send a callRemote() for each of the commands, or is there some way to wrap it so I can do it once?
edit: derp derp derp... :/
Calling the p.getMethodsRemote() instead of p.getNamesRemote() will of course return a table instead of a string... :/
Edited by Lost Ninja, 10 June 2013 - 11:27 AM.