Posted 08 November 2018 - 06:33 AM
Hello, took a small break but I'm back with more ideas and more walls to scale. Right now I'm trying to understand why when I utilize textutils.serialise() it results in the table I serialized to be jumbled. I haven't done a whole lot of research so if this is quite obvious I'm sorry. Reason being I'm going to bed soon and I'd just like to get my question in for tomorrow.
over here I have my code for receiver (turtle),
and over here I've got the pocket computer I'm sending from and it's code,
These are test scripts in order to better understand how to deal with sending these variables over rednet so that they can be used as args for a shell.run("goto", …) function.
The bigger picture reason for this endeavor is to create a function that receives the coords of the player(he/she's pocket computer) and runs goto for the turtle to return to the player.
Anyone's help is of course always appreciated. Thanks guys!
over here I have my code for receiver (turtle),
rednet.open("left")
local id, message = rednet.receive("remote")
print(textutils.serialise(message))
and over here I've got the pocket computer I'm sending from and it's code,
local coords = {
x = 1,
y = 5,
z = 2,
}
rednet.open("back")
rednet.send(9, coords, "remote")
These are test scripts in order to better understand how to deal with sending these variables over rednet so that they can be used as args for a shell.run("goto", …) function.
The bigger picture reason for this endeavor is to create a function that receives the coords of the player(he/she's pocket computer) and runs goto for the turtle to return to the player.
Anyone's help is of course always appreciated. Thanks guys!