Hello, currently I am using a HashMap from MemoryStoreService to store lobbies across multiple different servers for a party system. I am using a unique HashMap for every type of dungeon their is (4 currently) and I’m running into the problem of SetAsync always returning false.
From how the documentation describes it, SetAsync returns either true or false, with false indicating that it was unable to set or override an entry. This however has not occurred before, and if it was unable to set a value, an error would be thrown saying that I encountered a rate limit issue or something similar. I am wondering if I am running into some sort of hidden limitation or my implementation is wrong.
This is new behavior, and is really derailing development.
To be clear, this is the way I am using MemoryStore HashMap:
function PartyService:CreateParty(player: Player, partySettings: {})
local partyTable = {
host = player.UserId,
players = { player.UserId },
name = partySettings.Name or player.DisplayName .. "'s Party",
partyType = partySettings.PartyType,
mapSelected = partySettings.MapSelected,
difficulty = partySettings.Difficulty,
maxCount = partySettings.MaxCount,
joinRequests = {},
ready = false
}
if partySettings.PartyType == "Solo" then
self.Parties[player] = partyTable
return partyTable
end
player:SetAttribute("DungeonType", partyTable.mapSelected)
local setSuccess, setError = pcall(function()
return self.PartyManifest[partySettings.MapSelected].Hashmap:SetAsync(player.UserId, partyTable, 3600)
end)
print(setSuccess, setError)
return partyTable, player.UserId
end
I’ve verified that the tables in self.PartyManifest
do exist and contain the appropriate information, and the print()
outputs true, false
.
If there is a better implementation of Cross-Server parties, or if there is something I am missing from SetAsync, some guidance would be very appreciated.