Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

508: Exhausted all retries for key: %s ???

Asked by
ksony 54
5 years ago

My error : 508: Exhausted all retries for key: %s My Script :


--[[Savin' Dem Stats --]] game.Players.PlayerRemoving:connect(function(player) local datastore = game:GetService("DataStoreService"):GetDataStore(player.Name.."Stats") local statstorage = player:FindFirstChild("leaderstats"):GetChildren() for i = 1, #statstorage do datastore:SetAsync(statstorage[i].Name, statstorage[i].Value) print("saved data number "..i) end print("Stats successfully saved") end) --[[ Loadin' Dem Stats --]] game.Players.PlayerAdded:connect(function(player) local datastore = game:GetService("DataStoreService"):GetDataStore(player.Name.."Stats") player:WaitForChild("leaderstats") wait(1) local stats = player:FindFirstChild("leaderstats"):GetChildren() for i = 1, #stats do stats[i].Value = datastore:GetAsync(stats[i].Name) print("stat numba "..i.." has been found") end end)
0
%s is a single whitespace character in string patterns. The error just means you are saving to a whitespace key " "  too often. User#24403 69 — 5y
0
solution? ksony 54 — 5y
0
apparently its just a studio bug, should work in online. always use pcall() when working with datastores to prevent errors like these, read the wiki if you need help on how to do that Overscores 381 — 5y

Answer this question