I know the DataStore limit is 262144 bytes, but I don't want to have this ugly, probably not working system in my games:
function saveUsers()
SysMsg("Saving...")
local baseuData = DSS:GetDataStore("UserData")
local dataNum
local currentDataStore
while true do
dataNum = dataNum+1
currentDataStore = baseuData:GetAsync("Users"..dataNum)
if #currentDataStore<10000 then break end
end
for i = 1, #queue do
local Type, userId = queue[1], queue[2]
if Type == "a" then --easier, more common case
table.insert(currentDataStore, 1, userId)
table.insert(users, 1, userId)
end
end
queue = {}
end
Is there any way around this?
