Why does PhotonNetwork GetCustomRoomList fail after several connections?What does the [Flags] Enum Attribute mean in C#?Why does C# forbid generic attribute types?Why is Dictionary preferred over Hashtable in C#?Why is it important to override GetHashCode when Equals method is overridden?Why not inherit from List<T>?How to spawn an object by instantiating its prefab via photon unity network - unity 3dInvite a friend to a room (PlayFab, PUN+ and Unity)Unity and Photon Networking - Wait for other playersUNET: connect client to host using ip and portPUN 2 Not Connecting

Leaving the USA for 10 yrs when you have asylum

What can we do about our 9-month-old putting fingers down his throat?

Short story: Interstellar inspector senses "off" nature of planet hiding aggressive culture

Distance faces never sharp/clear. Too picky?

How to calculate the proper layer height multiples?

If every star in the universe except the Sun were destroyed, would we die?

How there are 3 possible tautomers of 2,2,4-trimethylheptane-3,5-dione?

How to handle fsck "Error while scanning inodes"?

Why can't some airports handle heavy aircraft while others do it easily (same runway length)?

How can faith be maintained in a world of living gods?

What's the biggest difference between these two photos?

A PEMDAS issue request for explanation

Remove outer padding in tikzcd

Why do the British opposition parties not want a new election?

Is there a "right" way to interpret a novel, if not, how do we make sure our novel is interpreted correctly?

Understanding the concept of Nowhere dense sets.

What explains the Genie's fate?

Why is it that I have to play this note on the piano as A sharp?

Stack class in Java8

How can I finish my PhD?

How invisible hand adjusts stock prices if company is listed on multiple exchanges, under multiple currencies, and one of the currencies plunges?

How should we understand "unobscured by flying friends" in this context?

Contractor cut joist hangers to make them fit

Strategies for dealing with chess burnout?



Why does PhotonNetwork GetCustomRoomList fail after several connections?


What does the [Flags] Enum Attribute mean in C#?Why does C# forbid generic attribute types?Why is Dictionary preferred over Hashtable in C#?Why is it important to override GetHashCode when Equals method is overridden?Why not inherit from List<T>?How to spawn an object by instantiating its prefab via photon unity network - unity 3dInvite a friend to a room (PlayFab, PUN+ and Unity)Unity and Photon Networking - Wait for other playersUNET: connect client to host using ip and portPUN 2 Not Connecting






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm trying to create a custom lobby, and have players randomly fill rooms that have maxPlayers=2, the first 2 players connect and join a room but when the third player connects and calls GetCustomRoomList I get this error:



GetGameList failed: OperationResponse 217: ReturnCode: -2 (SQL logic error or missing database near "LIMIT": syntax error). Parameters:



What I'm doing is first attempting to join a random room inside that custom lobby, and if that fails, create a new room.



I start connecting like this:



TypedLobby lobbyData = new TypedLobby ("Proto01Lobby", LobbyType.SqlLobby);

PhotonNetwork.GameVersion = GAME_VERSION;
PhotonNetwork.ConnectUsingSettings ();


Then I try to join the random room:



public override void OnConnectedToMaster()

Debug.Log ("Connetected!");
PhotonNetwork.JoinRandomRoom (null, 2, MatchmakingMode.FillRoom, lobbyData, null, null);



IF that fails I try to get the list of rooms, to then create a unique room name based on the amount of rooms in the lobby:



public override void OnJoinRandomFailed(short returnCode, string message)

Debug.Log ("Failed to connect to random room, Create a New Room");
PhotonNetwork.GetCustomRoomList (lobbyData, null);


public override void OnRoomListUpdate (List<RoomInfo> roomList)

Debug.Log ("Amount of rooms in lobbby: "+roomList.Count);
string roomName = "CanvasProto" + roomList.Count;
Debug.Log ("Create room: "+roomName);

RoomOptions options = new RoomOptions ();
options.MaxPlayers = 2;
PhotonNetwork.CreateRoom(roomName, options, lobbyData, null);



But when the third player connects, he/she never reaches the OnRoomListUpdate because for some reason it fails.










share|improve this question






























    1















    I'm trying to create a custom lobby, and have players randomly fill rooms that have maxPlayers=2, the first 2 players connect and join a room but when the third player connects and calls GetCustomRoomList I get this error:



    GetGameList failed: OperationResponse 217: ReturnCode: -2 (SQL logic error or missing database near "LIMIT": syntax error). Parameters:



    What I'm doing is first attempting to join a random room inside that custom lobby, and if that fails, create a new room.



    I start connecting like this:



    TypedLobby lobbyData = new TypedLobby ("Proto01Lobby", LobbyType.SqlLobby);

    PhotonNetwork.GameVersion = GAME_VERSION;
    PhotonNetwork.ConnectUsingSettings ();


    Then I try to join the random room:



    public override void OnConnectedToMaster()

    Debug.Log ("Connetected!");
    PhotonNetwork.JoinRandomRoom (null, 2, MatchmakingMode.FillRoom, lobbyData, null, null);



    IF that fails I try to get the list of rooms, to then create a unique room name based on the amount of rooms in the lobby:



    public override void OnJoinRandomFailed(short returnCode, string message)

    Debug.Log ("Failed to connect to random room, Create a New Room");
    PhotonNetwork.GetCustomRoomList (lobbyData, null);


    public override void OnRoomListUpdate (List<RoomInfo> roomList)

    Debug.Log ("Amount of rooms in lobbby: "+roomList.Count);
    string roomName = "CanvasProto" + roomList.Count;
    Debug.Log ("Create room: "+roomName);

    RoomOptions options = new RoomOptions ();
    options.MaxPlayers = 2;
    PhotonNetwork.CreateRoom(roomName, options, lobbyData, null);



    But when the third player connects, he/she never reaches the OnRoomListUpdate because for some reason it fails.










    share|improve this question


























      1












      1








      1








      I'm trying to create a custom lobby, and have players randomly fill rooms that have maxPlayers=2, the first 2 players connect and join a room but when the third player connects and calls GetCustomRoomList I get this error:



      GetGameList failed: OperationResponse 217: ReturnCode: -2 (SQL logic error or missing database near "LIMIT": syntax error). Parameters:



      What I'm doing is first attempting to join a random room inside that custom lobby, and if that fails, create a new room.



      I start connecting like this:



      TypedLobby lobbyData = new TypedLobby ("Proto01Lobby", LobbyType.SqlLobby);

      PhotonNetwork.GameVersion = GAME_VERSION;
      PhotonNetwork.ConnectUsingSettings ();


      Then I try to join the random room:



      public override void OnConnectedToMaster()

      Debug.Log ("Connetected!");
      PhotonNetwork.JoinRandomRoom (null, 2, MatchmakingMode.FillRoom, lobbyData, null, null);



      IF that fails I try to get the list of rooms, to then create a unique room name based on the amount of rooms in the lobby:



      public override void OnJoinRandomFailed(short returnCode, string message)

      Debug.Log ("Failed to connect to random room, Create a New Room");
      PhotonNetwork.GetCustomRoomList (lobbyData, null);


      public override void OnRoomListUpdate (List<RoomInfo> roomList)

      Debug.Log ("Amount of rooms in lobbby: "+roomList.Count);
      string roomName = "CanvasProto" + roomList.Count;
      Debug.Log ("Create room: "+roomName);

      RoomOptions options = new RoomOptions ();
      options.MaxPlayers = 2;
      PhotonNetwork.CreateRoom(roomName, options, lobbyData, null);



      But when the third player connects, he/she never reaches the OnRoomListUpdate because for some reason it fails.










      share|improve this question














      I'm trying to create a custom lobby, and have players randomly fill rooms that have maxPlayers=2, the first 2 players connect and join a room but when the third player connects and calls GetCustomRoomList I get this error:



      GetGameList failed: OperationResponse 217: ReturnCode: -2 (SQL logic error or missing database near "LIMIT": syntax error). Parameters:



      What I'm doing is first attempting to join a random room inside that custom lobby, and if that fails, create a new room.



      I start connecting like this:



      TypedLobby lobbyData = new TypedLobby ("Proto01Lobby", LobbyType.SqlLobby);

      PhotonNetwork.GameVersion = GAME_VERSION;
      PhotonNetwork.ConnectUsingSettings ();


      Then I try to join the random room:



      public override void OnConnectedToMaster()

      Debug.Log ("Connetected!");
      PhotonNetwork.JoinRandomRoom (null, 2, MatchmakingMode.FillRoom, lobbyData, null, null);



      IF that fails I try to get the list of rooms, to then create a unique room name based on the amount of rooms in the lobby:



      public override void OnJoinRandomFailed(short returnCode, string message)

      Debug.Log ("Failed to connect to random room, Create a New Room");
      PhotonNetwork.GetCustomRoomList (lobbyData, null);


      public override void OnRoomListUpdate (List<RoomInfo> roomList)

      Debug.Log ("Amount of rooms in lobbby: "+roomList.Count);
      string roomName = "CanvasProto" + roomList.Count;
      Debug.Log ("Create room: "+roomName);

      RoomOptions options = new RoomOptions ();
      options.MaxPlayers = 2;
      PhotonNetwork.CreateRoom(roomName, options, lobbyData, null);



      But when the third player connects, he/she never reaches the OnRoomListUpdate because for some reason it fails.







      c# unity3d photon






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 7:28









      user2000950user2000950

      1192 silver badges9 bronze badges




      1192 silver badges9 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          0
















          GetCustomRoomList fails because its trying to run an SQL query with null.



          You need to add a query that filters the rooms you are trying to fetch.



          If you want all rooms use GetRoomList().



          I should warn you, if 2 players are in one room and 2 new players try to join, both will see that they need to create a new room and you my have to clients trying to create 2 rooms with the same name at the same time.



          You will also not reuse room names for games that have finished.






          share|improve this answer

























          • Thanks. I don't see a static method for PhotonNetwork.GetRoomList() though... Using version 2.7. Also, from what you are saying, it's better to create a random name then I guess, right?

            – user2000950
            Mar 28 at 8:25











          • I also noticed that the first user that connects, does actually call GetCustomRoomList passing an SQL query as null, perhaps it doesn't fail because there aren't any rooms yet?

            – user2000950
            Mar 28 at 8:37






          • 1





            @user2000950 GetRoomList was removed in PUN2. You can find this info and others in the PUN1 to PUN2's "Migration Notes".

            – JohnTube
            Mar 29 at 11:12










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55392197%2fwhy-does-photonnetwork-getcustomroomlist-fail-after-several-connections%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0
















          GetCustomRoomList fails because its trying to run an SQL query with null.



          You need to add a query that filters the rooms you are trying to fetch.



          If you want all rooms use GetRoomList().



          I should warn you, if 2 players are in one room and 2 new players try to join, both will see that they need to create a new room and you my have to clients trying to create 2 rooms with the same name at the same time.



          You will also not reuse room names for games that have finished.






          share|improve this answer

























          • Thanks. I don't see a static method for PhotonNetwork.GetRoomList() though... Using version 2.7. Also, from what you are saying, it's better to create a random name then I guess, right?

            – user2000950
            Mar 28 at 8:25











          • I also noticed that the first user that connects, does actually call GetCustomRoomList passing an SQL query as null, perhaps it doesn't fail because there aren't any rooms yet?

            – user2000950
            Mar 28 at 8:37






          • 1





            @user2000950 GetRoomList was removed in PUN2. You can find this info and others in the PUN1 to PUN2's "Migration Notes".

            – JohnTube
            Mar 29 at 11:12















          0
















          GetCustomRoomList fails because its trying to run an SQL query with null.



          You need to add a query that filters the rooms you are trying to fetch.



          If you want all rooms use GetRoomList().



          I should warn you, if 2 players are in one room and 2 new players try to join, both will see that they need to create a new room and you my have to clients trying to create 2 rooms with the same name at the same time.



          You will also not reuse room names for games that have finished.






          share|improve this answer

























          • Thanks. I don't see a static method for PhotonNetwork.GetRoomList() though... Using version 2.7. Also, from what you are saying, it's better to create a random name then I guess, right?

            – user2000950
            Mar 28 at 8:25











          • I also noticed that the first user that connects, does actually call GetCustomRoomList passing an SQL query as null, perhaps it doesn't fail because there aren't any rooms yet?

            – user2000950
            Mar 28 at 8:37






          • 1





            @user2000950 GetRoomList was removed in PUN2. You can find this info and others in the PUN1 to PUN2's "Migration Notes".

            – JohnTube
            Mar 29 at 11:12













          0














          0










          0









          GetCustomRoomList fails because its trying to run an SQL query with null.



          You need to add a query that filters the rooms you are trying to fetch.



          If you want all rooms use GetRoomList().



          I should warn you, if 2 players are in one room and 2 new players try to join, both will see that they need to create a new room and you my have to clients trying to create 2 rooms with the same name at the same time.



          You will also not reuse room names for games that have finished.






          share|improve this answer













          GetCustomRoomList fails because its trying to run an SQL query with null.



          You need to add a query that filters the rooms you are trying to fetch.



          If you want all rooms use GetRoomList().



          I should warn you, if 2 players are in one room and 2 new players try to join, both will see that they need to create a new room and you my have to clients trying to create 2 rooms with the same name at the same time.



          You will also not reuse room names for games that have finished.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 28 at 8:05









          Tomer ShaharTomer Shahar

          3011 silver badge8 bronze badges




          3011 silver badge8 bronze badges















          • Thanks. I don't see a static method for PhotonNetwork.GetRoomList() though... Using version 2.7. Also, from what you are saying, it's better to create a random name then I guess, right?

            – user2000950
            Mar 28 at 8:25











          • I also noticed that the first user that connects, does actually call GetCustomRoomList passing an SQL query as null, perhaps it doesn't fail because there aren't any rooms yet?

            – user2000950
            Mar 28 at 8:37






          • 1





            @user2000950 GetRoomList was removed in PUN2. You can find this info and others in the PUN1 to PUN2's "Migration Notes".

            – JohnTube
            Mar 29 at 11:12

















          • Thanks. I don't see a static method for PhotonNetwork.GetRoomList() though... Using version 2.7. Also, from what you are saying, it's better to create a random name then I guess, right?

            – user2000950
            Mar 28 at 8:25











          • I also noticed that the first user that connects, does actually call GetCustomRoomList passing an SQL query as null, perhaps it doesn't fail because there aren't any rooms yet?

            – user2000950
            Mar 28 at 8:37






          • 1





            @user2000950 GetRoomList was removed in PUN2. You can find this info and others in the PUN1 to PUN2's "Migration Notes".

            – JohnTube
            Mar 29 at 11:12
















          Thanks. I don't see a static method for PhotonNetwork.GetRoomList() though... Using version 2.7. Also, from what you are saying, it's better to create a random name then I guess, right?

          – user2000950
          Mar 28 at 8:25





          Thanks. I don't see a static method for PhotonNetwork.GetRoomList() though... Using version 2.7. Also, from what you are saying, it's better to create a random name then I guess, right?

          – user2000950
          Mar 28 at 8:25













          I also noticed that the first user that connects, does actually call GetCustomRoomList passing an SQL query as null, perhaps it doesn't fail because there aren't any rooms yet?

          – user2000950
          Mar 28 at 8:37





          I also noticed that the first user that connects, does actually call GetCustomRoomList passing an SQL query as null, perhaps it doesn't fail because there aren't any rooms yet?

          – user2000950
          Mar 28 at 8:37




          1




          1





          @user2000950 GetRoomList was removed in PUN2. You can find this info and others in the PUN1 to PUN2's "Migration Notes".

          – JohnTube
          Mar 29 at 11:12





          @user2000950 GetRoomList was removed in PUN2. You can find this info and others in the PUN1 to PUN2's "Migration Notes".

          – JohnTube
          Mar 29 at 11:12








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.




















          draft saved

          draft discarded















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55392197%2fwhy-does-photonnetwork-getcustomroomlist-fail-after-several-connections%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현