How to set custom room properties that get listed in the lobby

Thanks again!

I would love to solve this by myself, but there is no way I manage to make it work. I will paste the code here and hope someone can spot what I’m doing wrong.

This is how I create the room:

local Array = require("photon.common.type.Array"); local exposedProps = Array.new("C0"); self:createRoom(nil, {maxPlayers = 2, lobbyName = "TOWERCRUSH\_LOBBY\_234k1", lobbyType = loadBalancingConstants.LobbyType.SqlLobby, propsListedInLobby = exposedProps, customRoomProperties = {["C0"] = 50}});

And later, how I try to join it:

local sqlFilterString = "C0 \> 25 AND C0 \< 75"; self:joinRandomRoom({lobbyType = loadBalancingConstants.LobbyType.SqlLobby, lobbyName = "TOWERCRUSH\_LOBBY\_234k1", sqlLobbyFilter = sqlFilterString});

It was not supposed to be that hard, but I’m doing something wrong and I can’t find the problem. I tried many variations from the code above, but it never worked.

Also, I’m hardcoding the region just to make sure both players can see each other.

Br,

Cleverson

So you expect that random join finds the match but it does not?

I updated demo-particle.with the code below and it works for me. But I do not see any difference with yours.

self:createRoom(nil, {maxPlayers = 2, lobbyName="TOWERCRUSH\_LOBBY\_234k1", lobbyType = LoadBalancingConstants.LobbyType.SqlLobby, propsListedInLobby = Array.new("C0"), customGameProperties = {["C0"] = 50}})

local sqlFilterString = "C0 \> 25 AND C0 \< 75" self:joinRandomRoom({lobbyName="TOWERCRUSH\_LOBBY\_234k1", lobbyType = LoadBalancingConstants.LobbyType.SqlLobby, sqlLobbyFilter = sqlFilterString})

Hi Photon team,

Thanks a lot for the help. I checked your code and saw the difference. In one of my attempts, I used the photon docs from other SDKs and changed the custom property variable name to:

customRoomProperties = {["C0"] = 50

instead of (like your code sample):

customGameProperties = {["C0"] = 50

In the first code sample I posted on September, the 4th, I used the correct name. But, then I changed it to customRoomProperties and that was the mistake.

Everything is working great now. Tower Crush will have PvP powered by Photon soon :slight_smile:

Thanks for the great support.

Br,

Cleverson