I am trying to create private rooms, but it failed.
It keeps returning error: com.smartfoxserver.v2.exceptions.SFSJoinRoomException: Join Error - Room password is wrong.
I've make sure the password for joining room is the same as the password set during room creation.
I've kept the password to be a constant value of "abc".
Code: Select all
SFSGameSettings settings = new SFSGameSettings(roomName);
settings.Password = "abc";Two of the passwords traced from server are:
ZBKtrdOSuHcXlIXa1444118913084
jnqexikZPMyQnsJB1444119869952
How can I set the correct room password? Do I miss anything? Thanks.
System information:
client: C# API 1.6.2
server: SmartFoxServer 2X 2.10.0
The private room is created by those lines:
Code: Select all
SFSGameSettings settings = new SFSGameSettings(roomName);
settings.MaxUsers = 2;
settings.MaxSpectators = 0;
settings.IsPublic = false;
settings.Password = "abc";
Sfs2X.Entities.User opponent = smartFox.UserManager.GetUserById(opponentID);
List<object> invitedUsers = new List<object>();
invitedUsers.Add(smartFox.MySelf);
invitedUsers.Add(opponent);
settings.InvitedPlayers = invitedUsers;
settings.MinPlayersToStartGame = 2;
settings.NotifyGameStarted = true;
//set room extension
settings.Extension = new RoomExtension("xxx", "xxx");
settings.GroupId = GetGroupId();
settings.IsGame = true;
smartFox.Send(new CreateSFSGameRequest(settings));Code: Select all
smartFox.Send(new JoinRoomRequest(roomID, "abc"));