[v2.1.0] MatchmakingService - ON HOLD

From what I see you didn’t require the service when you printed it. Also, it would be along the lines of require(path.to.service).GetSingleton().PlayerRanges

Great resource, Thank you so much for making it :happy1:

1 Like

I’m working on it at the time of me writing this reply, but I’m going to make a pull request here soon to add types to it so that when you require the module and get the singleton it will auto complete.

Edit: It could entirely be that it just wasn’t working for me, but after doing this, it’s working now. I’m not even halfway done. (1 hour in)

Edit 2: Mark time 21:01 PST. Finally finished adding the type, fixed an issue with a function not returning anything when it should have, and I submitted a pull request.

1 Like

I combed through all of my messages, and most were just people asking for help. I believe I reached out to everyone that messaged me now (if I missed you, send me another message). All of the bugs that I saw seemed to actually be related to roblox issues so there wasn’t really anything for me to fix.

Version 2.0.4

Changes (breaking):

  • None

Changes (non-breaking):

  • [Change] RemovePlayerFromGame no longer needs to be called manually. If the game is a game server, this will be handled automatically.

  • [Change] SetIsGameServer now accepts a second parameter updateJoinableOnLeave that denotes whether to update the joinable value when a player leaves. This is false by default.

  • [Addition] Reintroduced GetQueueCounts.

  • [Addition] Added typing to methods to allow for auto-complete (#19). Thank you @MrLonely1221 for this.

Fixes:

  • None

I realize this should probably be v2.1.0, but I’ve already made the release and don’t want to redo it lol.

2 Likes

Hello, I’m currently having an error where Roblox isn’t able to get the module
image
Here is the code:
image

just put the module in replicated storage and require it there

1 Like

yea i did that and it worked thx

1 Like

Hey, today i got this error sometimes works fine and sometimes i got this and doesn’t teleport the player

Also, someone knows how do i pass any data info to other place?

recently i got this error too sometimes

This error is just because the request failed you should retry

do you know how can i detect this? using pcall or something

Awesome service, thank you so much for sharing this! @steven4547466

Just integrated to my game and noticed that PlayerAddedToQueue and PlayerRemovedFromQueue events are not triggering cross server.
If two players are in the same server, they both get the events no problems.
But if one player is in server A and another in server B, when player A enters a queue in server A, player B in server B will never receive the event. I made sure to wait pass the 5 second wave too.
I’m using this to keep track of player queue info to display in UI, so that players can choose the map that has the most players queued up.

Could I be missing something?

The RequestFailed error seems to be back and occuring a lot more since the new budget changes.

It’s weird because the budget hasn’t change only the memory size changed no ?

The module heavily relies on GetRangeAsync to fetch the list of running games, which used to only take up 1 unit of the budget, they’ve recently changed it to taking up as many units as items returned, so in this module’s case up to 200. I think (?) it should be fine, however I still notice these errors pretty frequently.

Most APIs will only consume 1 unit. The exceptions are GetRangeAsync() for sorted maps, and ReadAsync() for queues. Both APIs will consume units based on the number of items returned. For example, if GetRangeAsync() returns 10 items, 10 request units will be counted towards the total quota.

oh that a bad news i don’t know about that…

image
image

As shown in the picture above, this error occurs when a player is deleted from the Queue.

Just integrated to my game and noticed that PlayerAddedToQueue and PlayerRemovedFromQueue events are not triggering cross server.

fixed this, i believe it was a bug

Original code:

MessagingService:SubscribeAsync("MatchmakingServicePlayersAddedToQueue", function(players)
  for _, v in ipairs(players) do
	if Players:GetPlayerByUserId(v) ~= nil then continue end

	MatchmakingService.Singleton.PlayerAddedToQueue:Fire(v[1], v[2], v[3], v[4])
  end
end)

MessagingService:SubscribeAsync("MatchmakingServicePlayersRemovedFromQueue", function(players)
  for _, v in ipairs(players) do
	if Players:GetPlayerByUserId(v) ~= nil then continue end
	MatchmakingService.Singleton.PlayerRemovedFromQueue:Fire(v[1], v[2], v[3], v[4])
  end
end)

Fixed:

MessagingService:SubscribeAsync("MatchmakingServicePlayersAddedToQueue", function(message)					
	for _, v in ipairs(message["Data"]) do
		if Players:GetPlayerByUserId(v[1]) ~= nil then continue end
		MatchmakingService.Singleton.PlayerAddedToQueue:Fire(v[1], v[2], v[3], v[4])
	end
end)

MessagingService:SubscribeAsync("MatchmakingServicePlayersRemovedFromQueue", function(message)
	for _, v in ipairs(message["Data"]) do
		if Players:GetPlayerByUserId(v[1]) ~= nil then continue end
		MatchmakingService.Singleton.PlayerRemovedFromQueue:Fire(v[1], v[2], v[3], v[4])
	end
end)
1 Like

Absolute life saver, thank you for your dedicated time to making this module perfect!