As the MemoryStoreQueue service was developed, I decided to create a matchmaking system from scratch, however, I ran into the problem of prioritising data through its function, :ReadAsync().
When the function is run, it returns an array of userIds
(of every index’s value), but the index seems to be sorted out (like an array without values), even though I can’t seem to find their rating
(the variable that prioritises the userId
).
Let me give you an example. Here’s the table of a userId
, with the .Rating
being my desired variable when passed through the 3rd argument through ReadAsync:
It’s then used as:
local success, result = pcall(function()
return getQueue:AddAsync(userId, 60, playerRatings[userId].Rating)
end)
But it’s read as:
Why is the index 1
and not the rating, which in this case, 7
? It should prioritise it. Where else is it prioritised?