Hi, I was using Ordered DataStores but I got an error saying “attempt to concatenate string with table. Line 35.” Code:
local dataStore = game:GetService("DataStoreService")
local playerData = dataStore:GetOrderedDataStore("playerData")
local participants = {
["A"] = 900;
["B"] = 1000;
["C"] = 910;
["D"] = 894;
["E"] = 0
}
for username, exp in pairs(participants) do
playerData:SetAsync(username, exp)
end
local pages = playerData:GetSortedAsync(false, 3)
while wait() do
local data = pages:GetCurrentPage()
for _, exp in pairs(data) do
print(exp.Key .. " - " .. exp.Value)
end
if pages.IsFinished then
break
else
print("---------------")
pages:AdvanceToNextPageAsync()
end
end