Forum Multiplayer CreateJoinRoom out of range exception

Discussion and help relating to the PlayerIO Multiplayer API.

CreateJoinRoom out of range exception

Postby KVADRO » August 13th, 2018, 9:06 pm

Hello World!

I run dev server, and set it as only active clusted in app dashboard, after that i tried to create room with CreateJoinRoom method, and each time i caught 'ArgumentOutOfRangeException'. But, when i switch to Main Cluster, everything works without this exception. Plus, when i set local dev server ip address, it works too without exception.

Code: Select all
m_client.CreateJoinRoom(null
      , "ClassicPvPRoom"
      , true
      , null
      , null
      , delegate(Connection _connection)
      {
         ProcessRequestResult(_connection);
      }
      , delegate(PlayerIOError _error)
      {
         ProcessRequestResult(null);
      });


Why is this happening? (Latest Unity SDK)
(Stack Trace)
System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
at System.Collections.Generic.List`1[PlayerIOClient.Internal.identifier126+identifier199].get_Item (Int32 index) [0x0000c] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633
at PlayerIOClient.Internal.identifier963.connect (System.Collections.Generic.List`1 endpoints, System.String joinKey, System.Collections.Generic.Dictionary`2 dnsExpanded, System.Collections.Generic.Dictionary`2 joinData, PlayerIOClient.Callback`1 successCallback, PlayerIOClient.Callback`1 errorCallback) [0x00000] in <filename unknown>:0
at PlayerIOClient.Internal.identifier963+identifier967.<CreateJoinRoom>b__6 (PlayerIOClient.Internal.identifier211 result) [0x00000] in <filename unknown>:0
at PlayerIOClient.Internal.identifier126+identifier837.<CreateJoinRoom>b__16 (PlayerIOClient.Internal.identifier211 returnValue) [0x00000] in <filename unknown>:0
at PlayerIOClient.Internal.identifier126+identifier828+identifier830[PlayerIOClient.Internal.identifier126+identifier203,PlayerIOClient.Internal.identifier126+identifier211,PlayerIOClient.PlayerIOError].MoveNext () [0x00000] in <filename unknown>:0
UnityEngine.Debug:LogError(Object)
PlayerIOClient.Internal.identifier830:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
KVADRO
 
Posts: 16
Joined: May 6th, 2018, 8:22 pm

Re: CreateJoinRoom out of range exception

Postby Henrik » August 18th, 2018, 8:55 am

Quick answer: Don't do that.

The reason you can put your dev server in the list of active clusters is if you want a trickle of live traffic to hit your dev server while most players are hitting the main servers.

If you're developing your game against your local dev server, use the DevelopmentServer property override in all your clients to make them connect to that.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm


Return to Multiplayer