Error: already in a room (joining lobby)

Options
Hi,

I'm trying to joing lobby like this:

[mLoadBalancingClient opJoinLobby:lobby_name];

I use this line on the "CONNECTED" event, but it throws an error:
EGLoadBalancing.mm:
line: 499 - already in a room
But I didn't joined any room. I also created a new app on the dashboard.

What I'm doing wrong? Thanks.

Comments

  • Kaiserludi
    Options
    Hi @Rurouni.

    When you have not explicitly set the autoJoinLobby flag to false, then the default value of true gets used, which means, that automatically joining the default lobby is part of the connection flow and that you don't get the callback that you are fully connected, before the client has already successfully entered the default lobby.
  • Rurouni
    Options
    Hi,

    Ok, solved that with:

    mLoadBalancingClient.AutoJoinLobby = false;

    But I have one more problem, it's saying when I try to create a room:
    EGLoadBAlancingClient opJoinRoom:::
    Line 647 - already in a gameroom
    I just joined the lobby...

    Thanks!
  • Kaiserludi
    Options
    Hi @Rurouni.

    Which operations (functions starting with 'op') are you calling and when?
  • Rurouni
    Options
    Hi,

    1.- [mLoadBalancingClient opJoinLobby:lobby_name];

    2.- [mLoadBalancingClient opCreteRoom:room_name :room_options];

    3.- [mLoadBalancingClient opJoinRoom:gameID :player_num];

    Thanks!
  • Kaiserludi
    Options
    Hi @Rurouni.

    These calls are all for the same player?

    In that case please just drop the 3rd call.

    Creating a room includes implicitly entering it. A client either enters a room by creating it or by joining an existing room that someone else has created.
  • Rurouni
    Options
    Hi @Kaiserludi,

    But, now if I do on the second player:

    [mLoadBalancingClient opJoinRoom opJoinRandomRoom];

    It says:
    failed with errorcode 32760: No match found. Client is therefore staying on masterserver!
    Well, in fact it said this before...

    Thanks.
  • Kaiserludi
    Options
    Hi @Rurouni.

    [mLoadBalancingClient opJoinRoom opJoinRandomRoom];
    Hu?
    That code doesn't make sense. I guess you meant
    [mLoadBalancingClient opJoinRandomRoom];,
    did you?

    Are you sure that both clients join the same lobby, use the same appID and the same version number?
  • Rurouni
    Options
    Hi @Kaiserludi,

    Excuse me, I just copy and paste from the previous message, so yes it is:

    [mLoadBalancingClient opJoinRandomRoom];

    They are on the same lobby, they have the same appID and the same number version.

    Thanks.
  • Kaiserludi
    Options
    Hi @Rurouni.

    Hmm, then it should fine that room. Please have alook at demo_loadBalancing_objc. It does the exact same thing, just with the default lobby. Depending on your input a client of that demo either creates a room or joins a random one. Please compare your app with that demo and see what you are doing different. It must be one of that differences.
  • Rurouni
    Options
    Hi @Kaiserludi,

    I'm doing the same :( Any idea the what is happening?

    Thanks.
  • Kaiserludi
    Options
    Hi @Rurouni.

    Well, when it works for you with the demo, but not with your app, then obviously you are doing something different somewhere.

    I would suggest that you spot the differences and change either the demo or your app step by step to behave EXACTLY the same like the other, while testing after every little step, if it makes a difference.