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;
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
add a comment |
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
add a comment |
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
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
c# unity3d photon
asked Mar 28 at 7:28
user2000950user2000950
1192 silver badges9 bronze badges
1192 silver badges9 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
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
@user2000950GetRoomList
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
@user2000950GetRoomList
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
add a comment |
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.
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
@user2000950GetRoomList
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
add a comment |
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.
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.
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
@user2000950GetRoomList
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
add a comment |
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
@user2000950GetRoomList
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
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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