This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
ETHANATOR360's profile picture

monitor variable problem

Started by ETHANATOR360, 10 August 2012 - 12:06 AM
ETHANATOR360 #1
Posted 10 August 2012 - 02:06 AM
i felt like making a trilaterator that sends the information to a computer that displays the location on a monitor

rednet.open ("top")
mon = peripheral.wrap ("back")
mon.clear()
mon.setCursorPos (1,1)
while true do
id, msg = rednet.receive()
client = id
print (client)
if msg == "server.gps.connect" then break
end
end
mon.write ("client conected at ")
print (client) -- test to see if value exists
mon.print (client)
mon.print (client) gives a attempt to call nil
Lyqyd #2
Posted 10 August 2012 - 02:36 AM
That's because print isn't a function exposed by the monitor peripheral. There's also no term.print(). You'll need to either use mon.write, or redirect the terminal to mon and then call just print().