I'm trying to set up a stargate control system using Rednet and two computers. My idea is to store the address for the stargate to dial in the variable "address", then send the contents of "address" over Rednet to the other terminal which would then wrap the stargate as a peripheral and dial it.
Is this possible and if so how would I go about doing it?
How Can I Preserve A Variable Across Rednet?
Started by JohnOptegrove, Nov 05 2013 08:24 PM
3 replies to this topic
#1
Posted 05 November 2013 - 08:24 PM
#2
Posted 06 November 2013 - 10:51 AM
Split into new topic.
Yep, just send the variable contents and receive it on the other side.
Yep, just send the variable contents and receive it on the other side.
#3
Posted 06 November 2013 - 04:22 PM
In particular, you'll be making use of either the modem or Rednet APIs.
What gets sent is the contents of your variable, which you dump into a new variable at the other end. If you wish to send a table (instead of a single value), you'll want to make use of textutils.serialize().
What gets sent is the contents of your variable, which you dump into a new variable at the other end. If you wish to send a table (instead of a single value), you'll want to make use of textutils.serialize().
#4
Posted 06 November 2013 - 08:49 PM
Tables can be sent across without the need for serialization and deserialization in more recent versions.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











