[v2.1.0] MatchmakingService - ON HOLD

Hey,

just wanted to let you know
the module is working again!

So Great :pray: :partying_face:

Good to hear. Just curious though were you able to find the issue or did it just start working? If you found the issue it would be helpful if you explained it if other people have the same problem.

2 Likes

I pushed a small update that does not change anything internally but exposes a convenience method to get the queue of a specific rating:

Version 3.1.0-beta
Changes (breaking):

  • None

Changes (non-breaking):

  • [Addition] MatchmakingService:GetQueue(ratingType) Gets the queue of the specified rating type. Returns the values in a dictionary of {skillLevel: queue} where skill level is the skill level pool (a rounded rating) and queue is a table of user ids.

Fixes:

  • None
local MatchmakingService = require(7567983240).GetSingleton()
local queues = MatchmakingService:GetQueue(ratingType)

queues is a dictionary that would look like this:

{
	[poolOne] = {userId, userId2, userId3, ...};
	[poolTwo] = {userId, userId2, userId3, ...};
	...;
}

The pool is a rounded rating. It’s internally stored as a string, so if you want to perform mathematical expressions on it make sure you convert it to a number. So if you want to get the queue of a specific rating in a specific pool, say 500 rating: MatchmakingService:GetQueue(ratingType)["500"] would get you that queue.

3 Likes

Hi
Yeah as you said the module just started to work again

Probably MemoryStoreService isn’t ready yet :slight_smile:

1 Like

Do you plan to add documentation soon? I find in-thread documentations hard to read.

Documentation is planned soon, but front end is not my strong suit, however I would be happy to provide assistance in private messages if you need it.

1 Like

Pushed a small fix that should prevent any type of server hang from destroying matchmaking:

Version 3.1.1-beta
Changes (breaking):

  • None

Changes (non-breaking):

  • None

Fixes:

  • [Fix] Added a fallback to updating main job. If 25 seconds has passed without the main job being updated, a running game will automatically reassign itself as the main job. By default, however, the main job removes itself on close, but this will prevent server hangs from causing lasting issues
1 Like

Keep getting this error when players are in the server for matchmaking.

I had the same problem, add debounce to the server script and wait for something like 5 seconds then you should be ok.

I took a look at the github code and it seems to already wait 3 seconds so just extend that time especially on errors or something like that. Or give us the option to do something like keep waiting until it finds it. I also don’t even use the rating system personally so could you just add a way to disable that as well?

1 Like

Probably ProfileService loading the player data…

Oh sorry I think I misunderstood what you said the first time. Do you mean that I should add a debounce to my script? and if so where?

1 Like

Just add 5 seconds delay or wait before its start to queue the player

Works fine to me!

example of my script:

task.spawn(function()

	task.wait(5)
	canAcceptMatches.Value = true

end)

game.ReplicatedStorage.StartMatch.OnServerEvent:Connect(function(plr, gameType)
	
	if canAcceptMatches.Value == false then
		return
	end
	
	if gameType == nil or "" then return end
	if inGame[plr.Name] == true then return end
	inGame[plr.Name] = true
	
	if gameType == "ranked" then
		
		MatchmakingService:QueuePlayer(plr,gameType)
	elseif gameType == "causal" then
		MatchmakingService:QueuePlayer(plr,gameType)
	end
end)


I am now getting this error when I try to start a game. It appears the debounce seems to be working for the profile loading though.

1 Like

Hey,

I don’t seem to have a problem with this!

Would you mind, sharing the script?

-- Obtain the service
local MatchmakingService = require(7567983240).GetSingleton()
MatchmakingService:SetMatchmakingInterval(10)
MatchmakingService:SetPlayerRange(NumberRange.new(4, 4))
MatchmakingService:SetGamePlace(7670616114)

-- Queue players (you can call QueuePlayer from anywhere)
game.Players.PlayerAdded:Connect(function(p)
	wait(5)
	MatchmakingService:QueuePlayer(p, "Solo")
end)

game.Players.PlayerRemoving:Connect(function(p)
	MatchmakingService:RemovePlayerFromQueue(p)
end)

for i, p in ipairs(game.Players:GetPlayers()) do
	wait(5)
	MatchmakingService:QueuePlayer(p, "Solo")
end
1 Like

Hey,

I don’t seem to get this problem!

I used the same script you gave me, and it’s working

Hmm I dont know ill continue testing. I am still getting that the value is too long. Edit: Made a new place and works fine … idk but good for now.

1 Like

I would say if you run in to problems like the above use MatchmakingService:Clear() to clear the memory to see if that’s the issue. As for profile loading I’ll allow more time for it to wait before erroring.

I pushed 3.1.2-beta which increases the wait time on profiles to 8 seconds.

EDIT: I also just pushed another fix for attempting to index a nil table

1 Like

Some pretty big issues have been brought to my attention. Because of this I will be writing my own caching module to assist with reducing the number of calls to the memorystore.

3 Likes