Hi. Im back to photon after probably an year or something. I just merged the multiplayer branch into the main one.
First thing I did was download the new version (1.91), and now Im testing it.
Im getting an error at joining a room:
Operation failed: OperationResponse 248: ReturnCode: -2 (Unknown operation code). Parameters: {} Server: MasterServer
The thing is, I dont remember having any errors before, so I think this is a new thing, I might be wrong.
But I dont understand the logic behind the error either.
I cant set interest groups before joining the room? Why? I should..
Since Im able to set player data before joining a room, and it will sync to other players after I join one...Why isnt the same case with interest groups?
The fact that I cant just means theres a gap between joining and setting the interest group where the server might waste band sending me stuff I dont want.
Am I wrong here?
My app is a perfect example of that. Its a stream of race events (athletics 100m, 200m..), max of 8 players, the races keep going forever, but theres no waiting for max players, 3 players might be racing while 2 just enter the room and wait for the race to finish..I dont want to send racing players data to waiting players.
Maybe Im wrong about whats going on, but I think this worked before..Heres my code:
First thing I did was download the new version (1.91), and now Im testing it.
Im getting an error at joining a room:
Operation failed: OperationResponse 248: ReturnCode: -2 (Unknown operation code). Parameters: {} Server: MasterServer
The thing is, I dont remember having any errors before, so I think this is a new thing, I might be wrong.
But I dont understand the logic behind the error either.
I cant set interest groups before joining the room? Why? I should..
Since Im able to set player data before joining a room, and it will sync to other players after I join one...Why isnt the same case with interest groups?
The fact that I cant just means theres a gap between joining and setting the interest group where the server might waste band sending me stuff I dont want.
Am I wrong here?
My app is a perfect example of that. Its a stream of race events (athletics 100m, 200m..), max of 8 players, the races keep going forever, but theres no waiting for max players, 3 players might be racing while 2 just enter the room and wait for the race to finish..I dont want to send racing players data to waiting players.
Maybe Im wrong about whats going on, but I think this worked before..Heres my code:
public void JoinEmptyRoom()
{
if ( PUNOlympian._instance.GetState() != PUNOlympian.OperationState.standby_in_lobby )
return;
_lastErrorCode = 0;
PhotonNetwork.SetPlayerCustomProperties(
new RoomHashtable() {
{ HASH_KEYS.szPLAYER_STATE, PlayerState.waiting }
}
);
PhotonNetwork.SetInterestGroups(( byte ) PlayerState.playing, false); // commenting this stops the error // calling this on the joinedroom callback also works
PUNOlympian._instance.JoinAnyRoomWithOption(ref _options, ref _callbacks);
}