Memorystoreservice not allowing me to get hashmap

I am trying to make a serverlist system with MemoryStoreService, but I have run into an error regarding MemoryStoreService:GetHashMap() that i can’t seem to find any documentation about. How can i solve this issue?

The error in console:
image

Code

local MemoryStoreService = game:GetService("MemoryStoreService")
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local ServerListHashmap = MemoryStoreService:GetHashMap("ServerList")
local RefreshRemote = game.ReplicatedStorage:WaitForChild("DataStoreDataRetriever")
local TeleportRemote = game.ReplicatedStorage:WaitForChild("TeleportPlayer")
1 Like

You could try a pcall to try and retrieve the HashMap multiple times, with exponential backoff and a max retry limit:

local MAX_RETRIES = 5
local RETRY_INTERVAL = 2

local function getServerListHashMap()
    for attempt = 1, MAX_RETRIES do
        local success, hashmap = pcall(function()
            return MemoryStoreService:GetHashMap("ServerList")
        end)
        
        if success then
            return hashmap
        else
            warn("Failed to get ServerList hashmap:", hashmap)
            wait(RETRY_INTERVAL * attempt) -- Exponential backoff
        end
    end
    error("Failed to get ServerList hashmap after max retries.")
end

local MemoryStoreService = game:GetService("MemoryStoreService")
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local ServerListHashmap = getServerListHashMap()
local RefreshRemote = game.ReplicatedStorage:WaitForChild("DataStoreDataRetriever")
local TeleportRemote = game.ReplicatedStorage:WaitForChild("TeleportPlayer")

Apologies for the delayed response, I just discovered this post. The Hash Map API is in private beta right now hence the error, we plan to release it this quarter. The beta will be open to the public very shortly. Extremely sorry for not noticing this thread and responding sooner.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.