Code | require("datastream")
function exampleStreamHandler( sender, handler, id, encoded, decoded )
Msg("Datastream received:\n")
Msg("Sender: "..sender:Nick().."\n") --Our sender's name.
Msg("Handler: "..handler.."\n") --Stream's handler (AKA Stream name), in our case, 'ExampleStream'.
Msg("Data 1: "..decoded[1].."\n") --The first entry in the 'decoded' table, which is "Hi, I'm a string!".
Msg("Data 2: "..decoded[2].."\n") --The second entry in 'decoded' table, which is 1.
end
datastream.Hook( "ExampleStream", exampleStreamHandler ) |