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

Rednet custom parameters ?

Started by jakeflee, 11 November 2012 - 05:47 PM
jakeflee #1
Posted 11 November 2012 - 06:47 PM
so i know that there are some parameters in the rednet_message command, argument, thing, or what ever it is called (I,m not here for a lesson in vocabulary), like computer id, and Message. But can you add another parameter to a sent message through rednet.send("id","message", "param_x", "param_z")

if so how


will it work like print does when you have


A = "hi"
b = "how are you"
print(A,:unsure:/>/>

right now i want to add another parameter to a rednet_message for a remote console thing for a email server + dns server type setup for an internet like set of programs.

thank you in advance.
PixelToast #2
Posted 11 November 2012 - 07:40 PM
serialize a table then send it
there is no point in adding this and it will break some programs that rely on it unpacking properly
zekesonxx #3
Posted 11 November 2012 - 08:13 PM
What you have to do is either make a table or combine the two into a string, and then separate them on the other computer.

Or you could do just

isGood = false
while not isGood do
idX, varX = rednet.receive()
idY, varY = rednet.receive()
if idX == idY then
isGood = true
end
end
jakeflee #4
Posted 11 November 2012 - 10:05 PM
thank you
that will add a lot of code to it, :unsure:/>/> ill think of something

maybe i will just have one comp send the address to a infrastructure server then the command then some sort of end message then have the server on the other side send what ever to the client
ugh still a lot of code well ill deal with it tomorrow.
Edited on 11 November 2012 - 09:13 PM