How do I transfer function data from one computer to another
1
2 replies to this topic
#1
Posted 23 August 2018 - 12:40 PM
#2
Posted 23 August 2018 - 02:17 PM
As in, send a function for a second computer to execute? You can't* and it's a bad idea. Just transmit a message and have the other computer do something based on the contents of said message.
*unless it satisfies the requirements of string.dump.
*unless it satisfies the requirements of string.dump.
#3
Posted 23 August 2018 - 04:18 PM
To clarify KoGY's reply a bit - execute the function on one computer then send the results to the other computer and have the other computer act on the results. It might look something like this...
--# Computer 1 (id 1) local function doStuff() --# do stuff here that produces the result you need end rednet.send(2, result) --# send the result to computer id # 2 --# Computer 2 (id 2) local id, message = rednet.recieve() if id == 1 then --# if the data is sent from computer id # 1 then do the following... --# do stuff with the message which will be the result sent from computer # 1 end
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users