Since yesterday i have some Problems with BigDB. When acessing the player objects _sometimes_ i get this exception:
- Code: Select all
System.Exception: Property does not exist: sector
at PlayerIOClient.Internal.DBCoreObject`1[K].DeepGet (System.String property, Boolean throwOnMissing) [0x00000] in <filename unknown>:0
at PlayerIOClient.DatabaseObject.GetString (System.String propertyExpression) [0x00000] in <filename unknown>:0
at PlayerIOManager+<ConnectToSector>c__AnonStorey9.<>m__4 (PlayerIOClient.DatabaseObject dbObj) [0x00000] in <filename unknown>:0
at PlayerIOClient.Internal.PlayerIOChannel+LoadMyPlayerObjectCaller`1[T].success (PlayerIOClient.Internal.LoadMyPlayerObjectOutput output) [0x00000] in <filename unknown>:0
at PlayerIOClient.Internal.PlayerIOChannel+UnityWWW+<call>d__ff`3[PlayerIOClient.Internal.PlayerIOChannel+LoadMyPlayerObjectArgs,PlayerIOClient.Internal.PlayerIOChannel+LoadMyPlayerObjectOutput,PlayerIOClient.PlayerIOError].MoveNext () [0x00000] in <filename unknown>:0
This is the code where this exception is thrown:
- Code: Select all
MyClient.BigDB.LoadMyPlayerObject(delegate(DatabaseObject dbObj)
{
DBObject = dbObj;
Debug.Log("Accessing dbobject");
string sector = "";
string roomType = "";
if(isNewUser)
{
Debug.Log("NEW USER");
sector = "01";
roomType = "ShipsPlayerCreation";
}
else
{
Debug.Log("RETURNING USER");
sector = dbObj.GetString("sector");
roomType = "ShipsSector";
Application.LoadLevelAsync(sector);
Debug.Log("Load Sector: " + sector);
}
// Create or join the room / sector
PlayerIOManager.MyClient.Multiplayer.CreateJoinRoom(
sector, //Room id. If set to null a random roomid is used
roomType, //The room type started on the server
true, //Should the room be visible in the lobby?
null,
null,
// If we joined the room successfully this method is called
delegate(Connection connection)
{
Debug.Log("Joined Room.");
PlayerIOManager.joinedRoom = true;
PlayerIOManager.ServerConnection = connection;
PlayerIOManager.ServerConnection.OnMessage += PlayerIOManager.handlemessage;
},
// otherwise this method is called.
delegate(PlayerIOError error)
{
Debug.LogError("ERROR could not join the room " + sector);
Debug.LogError(error.Message);
}
);
});
}
The property definetly exists on the Object, i looked it up in the BigDB web-interface. Am i doing something wrong? I found an old thread regarding the same problem here: http://playerio.com/forum/post42209. But that didn't help me.
Thanks in advance!