How could I transfer a table from one server to another.
Orr… transfer a table from one server to all servers.
This to be for global logs.
How could I transfer a table from one server to another.
Orr… transfer a table from one server to all servers.
This to be for global logs.
Use MessagingService to send your table to other servers. On the other hand, what are you trying to send to other servers?
… its in the question
How could I transfer a table from one server to another.
could you give a example?
the docs dont go to detailed in this section.
My bad for wording it incorrectly, what is in your table that your trying to send to other servers?
im pretty sure messaging service replicates it
It’s a pretty simple service to use as it’s just a send and recieve based service.
local MessagingService = game:GetService("MessagingService")
local TopicName = "Test"
local data = {"Yes", "No", {1,2,3}}
local function OnMessageRecieve(data, timesent) --print out the data
print(data)
end
local success, recieverCon = pcall(function() --recieverCon is a connection to the subscribed topic for this server to listen to
return MessagingService:SubscribeAync(TopicName, OnMessageRecieve)
end)
MessagingService:PublishAsync(TopicName, data) --also wrap this in a pcall
Sending the table on a loop tru MessagingService to keep the data updated could be a good idea, as @TenBlocke is suggesting thats a good way to comunicate between servers.
But, what exactly is “global logs”?
Logging admin commands used for massive games.
MessagingService:PublishAsync(TopicName, data) --also wrap this in a pcall
i send data using this function correct?
08:57:42.689 MessagingService:PublishAsync(): Cannot publish Dictionary, can only accept valid UTF-8 characters. - Server - NotBugle:211
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.