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

Detecting Certain rednet.send() messages and storing in Variables

Started by aSdtIHN0dXBpZA==, 28 October 2012 - 12:34 PM
aSdtIHN0dXBpZA== #1
Posted 28 October 2012 - 01:34 PM
Question is mostly in the title. To better explain:

If Computer 1 sends Computer 2 a message saying "act" for example, if Computer 2 receives that message, how do I make Computer 2 store it in a Variable, or act upon it? I was thinking of making a simple communication link or global MySQL data base thing to store notes, and can do it perfectly, I just need help on how to do this bit. Anyone?

This is probably common knowledge as to me, it seems like it's the only way to make a virtual Facebook, like others have already done, so I know it's possible, I just don't know how.
KaoS #2
Posted 28 October 2012 - 01:40 PM
just say

id,msg,dist=rednet.receive()
then when you get the message the variable 'msg' holds the message, you can then use it any way you like

print(msg)
aSdtIHN0dXBpZA== #3
Posted 28 October 2012 - 02:12 PM
just say

id,msg,dist=rednet.receive()
then when you get the message the variable 'msg' holds the message, you can then use it any way you like

print(msg)

Okay, thanks a lot.
KaoS #4
Posted 28 October 2012 - 02:39 PM
no problem :D/>/>