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

[lua] rednet help

Started by chriskopp7, 14 June 2012 - 07:58 PM
chriskopp7 #1
Posted 14 June 2012 - 09:58 PM
i want to be able to print a computer id on the screen so it is like this



here is the full code in case i did something rong :(/>/>


all of the ends are there because i have 7 programs in one program so i need all of those
MysticT #2
Posted 14 June 2012 - 10:10 PM
You need to save the received id and message to use them:

local id, msg = rednet.receive()
print("Message sent from: ", id)
print(msg)

Also, you don't have to do rednet.close before rednet.open.
chriskopp7 #3
Posted 14 June 2012 - 10:12 PM
You need to save the received id and message to use them:

local id, msg = rednet.receive()
print("Message sent from: ", id)
print(msg)

Also, you don't have to do rednet.close before rednet.open.
thanks
Bossman201 #4
Posted 15 June 2012 - 03:05 AM
Your formatting is weird.