Hi is it possible to createSFSGame with password but not with invite user list? in my game I want to create game room which is open for anyone who knows the password.
Without invitee list I am getting following error:
java.lang.NullPointerException
at com.smartfoxserver.v2.api.SFSGameApi.populateInvitations(SFSGameApi.java:361)
at com.smartfoxserver.v2.api.SFSGameApi.createGame(SFSGameApi.java:153)
at common.BaseGameManager.createSFSGameRoom(BaseGameManager.java:201)
at common.BaseGameManager.createGameRoom1(BaseGameManager.java:153)
at com.zone.managers.GameManager.createGameRoom(GameManager.java:695)
at com.zone.managers.GameManager.manageAllGames(GameManager.java:154)
at com.zone.extension.LobbyExtension$GameManagerTask.run(LobbyExtension.java:367)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Private createSFSgame without inviteelist
Re: Private createSFSgame without inviteelist
Hi,
with the SFSGame room you have two options:
1) public Room, allows people to join freely provided that they match certain criteria you provide (based on User Variables)
2) private Room, allows only invited people to join
If you're going to create a private Room and then give passwords to a group of people I think option #2 gives you the same result, and saves you some work.
You just need to provide the list of people you want in the Room and you don't need to worry about passing passwords around to everyone.
Makes sense?
with the SFSGame room you have two options:
1) public Room, allows people to join freely provided that they match certain criteria you provide (based on User Variables)
2) private Room, allows only invited people to join
If you're going to create a private Room and then give passwords to a group of people I think option #2 gives you the same result, and saves you some work.
You just need to provide the list of people you want in the Room and you don't need to worry about passing passwords around to everyone.
Makes sense?
Re: Private createSFSgame without inviteelist
I am sorry seems I was not clear on my question , actually I dont have any specific userlist.. in my lobby I show rooms(created from server) some are password protected and some are not.. if anyone want to join a password protected room he must enter the password.
Re: Private createSFSgame without inviteelist
Ok.
Normally private SFSGame rooms work with invitations.
You could create a private SFSGame and pass an empty list of invitees. This would work as well. Keep in mind that the password for SFSGame rooms is auto-generated from the server side, so you can't set a custom one.
What you can do is read the password via Room.getPassword() and send it to those you want to join.
hope it helps
Normally private SFSGame rooms work with invitations.
You could create a private SFSGame and pass an empty list of invitees. This would work as well. Keep in mind that the password for SFSGame rooms is auto-generated from the server side, so you can't set a custom one.
What you can do is read the password via Room.getPassword() and send it to those you want to join.
hope it helps
Who is online
Users browsing this forum: No registered users and 66 guests