[strike]yea it doesn’t fire anymore, and the only leads I have are in the Last spoiler.[/strike]
Edit: {
it doesn’t fire cross-servers/cross-places
Game Server = Server 1
Network Server = Server 2
}
This bit of code has never failed before like a month ago (last time it was used often).
On a Game Server Place:
[spoiler][code]
local rdsSend = game:GetService(“DataStoreService”):GetDataStore(“ReplayStore”)
local rdsData = game:GetService(“DataStoreService”):GetDataStore(“ReplayMemory”)
. . . . .
function SendR(prop)
. . . .
local dsr = {} – this table holds replay Data only
local ssr = {} – this table is information on where the replay came from
ssr[“game”] = GetTeamStr()
dsr[“RData”] = PSD
dsr[“PN”] = PND
dsr[“DP”] = DPD
dsr[“numf”] = numberofframes
dsr[“sf”] = startframe
dsr[“ff”] = finalframe
ssr[“Score”] = {workspace.Data.HS.Value,workspace.Data.VS.Value}
ssr[“Period”] = workspace.Data.Period.Value
ssr[“Sender”] = workspace.Data.SendPS.Value
ssr[“AT”] = workspace.Data.AwayT.TN.Value
ssr[“HT”] = workspace.Data.HomeT.TN.Value
ssr[“Status”] = “Red”
ssr[“SID”] = game.JobId
ssr[“PID”] = game.PlaceId
ssr[“Key”] = “S”…banwag…“”
ssr[“Find”] = rdsSend:GetAsync(“Keys”) – very important this is how the
print("Respone Key is "…ssr[“Find”]) – other server knows where to send data
rdsSend:UpdateAsync(“Keys”,function(iuy) return iuy + 1 end) – this is a unique key
. . . . .
rdsSend:UpdateAsync(“Replays”,function(StoredGames)
if StoredGames == nil or StoredGames == {} then
return {ssr}
else
table.insert(StoredGames,ssr)
return StoredGames
end
end)
workspace.Data.SRLink.Value = true
rdsSend:OnUpdate(“SR”…ssr[“Find”],function(ServerResponse)
print(“INCOMEING REPORT”) – is never printed
if ServerResponse ~= nil then
workspace.Data.SeNam.Value = ServerResponse[2]
workspace.Data.SeRes.Value = ServerResponse[1]
end
end)
rdsSend:OnUpdate(“BR”…ssr[“Find”],function(IsLooking)
print(“REPLAY IS BEING WATCHED”) – is never printed
if IsLooking ~= nil then
workspace.Data.BeingViewed.Value = IsLooking
end
end)
jcon = workspace.Data.SRLink.Changed:connect(function()
if workspace.Data.SRLink.Value == false and workspace.Data.BeingViewed.Value == false then
rdsSend:UpdateAsync(“Replays”,function(StoredGames2)
for uqw = 1, #StoredGames2 do
if StoredGames2[uqw][“Find”] == ssr[“Find”] then
StoredGames2[uqw][“Status”] = “Yellow”
end
end
return StoredGames2
end)
end
end)
. . . .
end
[/code][/spoiler]
Code on the Network Place:
[spoiler][code] – Warning this Server is not FE
. . . .
local replays = {}
local rdsSend = game:GetService(“DataStoreService”):GetDataStore(“ReplayStore”)
local rdsData = game:GetService(“DataStoreService”):GetDataStore(“ReplayMemory”)
function GetNewList(new)
replays = new
end
local listofReplays = rdsSend:GetAsync(“Replays”)
if listofReplays ~= nil then
replays = listofReplays
end
rdsSend:OnUpdate(“Replays”,GetNewList) – even this will fail to fire sometimes
– although when I reset my character it runs this piece of code, but I get errors like “Script that implemented this callback has been destroyed” and “Callbacks cannot yield”
function OpenUpReplay(clip)
. . . . .
roc.W.B.MouseButton1Click:connect(function()
local CW = rdsSend:GetAsync(“BR”…clip[“Find”])
if CW == nil and HasRank(player,200) then
print("Respone Key is "…clip[“Find”]) – this gets printed
rdsSend:UpdateAsync(“BR”…clip[“Find”],function(nol) return true end)
end
. . . . .
end)
end
OpenUpReplay(replays[sframe.V.Value])
[/code][/spoiler]
This code Takes two Tables, one a Large Replay Data Table that can take up to 3 Keys in a datastore, and the other a smaller table that stores information on where the replay came from.
The second table is of Importance. It has a Index at “Find” which holds a unique Integer. Now on the Game Server there is this:
rdsSend:OnUpdate("BR"..ssr["Find"],function(IsLooking)
so it is waiting for a change to the Key “BR550” for example.
now from the Network Server there is this line:
rdsSend:UpdateAsync("BR"..clip["Find"],function(nol) return true end)
this sets the Key BR550 to true (since “ssr” and “clip” are the same table just different variable names for the different servers)
so by my understanding the Game server should pick up the change in about 6-20 seconds.
Last time it was in use often, it worked just how its described, but now it doesn’t and rdsSend:OnUpdate("BR"..ssr["Find"],function(IsLooking)
is never fired, and instead I get errors like the one in the below spoiler on the Network Server, and no errors on the Game Server.
[strike]what does this mean?[/strike]
[spoiler]
[strike]wtf imgur deleted my first image?
and my second one -.-[/strike]
whatever, I’m getting “Script that implemented this callback has been destroyed” and “Callbacks cannot yield” errors[/spoiler]
never gotten these errors before when this thing used to work.