Code: Select all
getApi().joinRoom(user, room, null, false, null);Code: Select all
getApi().joinRoom(user, room, null, false, null);Code: Select all
// Create the room's settings
CreateRoomSettings crs = new CreateRoomSettings();
crs.setName(roomName);
//crs.setName("TestDungeon"+user.getId());
crs.setMaxUsers(100);
crs.setMaxVariablesAllowed(20);
crs.setGame(true);
//
vars.add(new SFSRoomVariable("isBattle", 1));
crs.setRoomVariables(vars);
// Create the room on the server
room = extension.getApi().createRoom(user.getZone(), crs, user, false, null);
Code: Select all
extension.getApi().joinRoom(user, room, null, false, null);Code: Select all
getApi().joinRoom(user, room, null, false, null);Nothing at all in the log after the 2nd user joins the room aside from a trace that says he left his previous room. I have tried upgrading to 2.0.1, but I still have the same issue.Lapo wrote:That is certainly strange. I cannot test under RC3 because we are now at version 2.0.1, although I would expect it to work under RC3 as well.
Additionally if works for one user it should work for any others unless there are errors that you are not seeing.
Did you check the logs for possible errors when the 2nd user joins?
Code: Select all
def runTest():
zone = _base.parentZone
theLobby = zone.getRoomByName("The Lobby")
userPippo = _sfsApi.createNPC("PiPPo", zone, False)
userCiccio = _sfsApi.createNPC("CiCCio", zone, False)
# Join a common Room
_sfsApi.joinRoom(userPippo, theLobby)
_sfsApi.joinRoom(userCiccio, theLobby)
# Create game room, join it, without leaving lobby
theRoom = createRoom(userCiccio)
_sfsApi.joinRoom(userPippo, theRoom, None, False, None)
_sfsApi.joinRoom(userCiccio, theRoom, None, False, None)
def createRoom(owner):
currZone = _base.getParentZone()
settings = CreateRoomSettings()
settings.setGame(True)
settings.setDynamic(True)
settings.setName("Room_" + owner.name)
settings.setMaxUsers(10)
newRoom = _sfsApi.createRoom(
currZone,
settings,
owner,
False,
None,
False,
False
)
trace("New Room: ", newRoom)
return newRoom
Code: Select all
requestHandler.getApi().joinRoom(bot, room, null, false, null);