leaderboards:UpdateAsync("leaderboard", function(totalList)
local ties = totalList[pdata.InfiniteWave]
if not ties then
ties = {player.UserId}
elseif not table.find(ties, player.UserId) then
table.insert(ties, player.UserId)
end
for i, v in pairs(totalList) do
if i ~= pdata.InfiniteWave and table.find(v, player.UserId) then
table.remove(v, table.find(v, player.UserId))
end
end
totalList[pdata.InfiniteWave] = ties
return totalList
end)
nothing is changed after this runs
am i just stupid why
please help
pdata.InfiniteWave is a number
i use that as an key to a dictionary
the dictionary has tables of users who hold the same wave
example
{
[1] = {520525; 12040242;}
[26] = {259259; 251034023}
}
it saves sometimes but not all the time
very weird