Page 1 of 1

OnJoinRoom is not fired

Posted: 08 Apr 2009, 08:47
by manx
The onJoinRoom function is not fired on the client side if i do a joinRoom from the server side.

The Server side code is in Java and the client side code is in C#.

Do i have a SendRoomList from the server side ...

Need help asap.

Posted: 08 Apr 2009, 20:57
by ThomasLund
Can you see in the log (when running debug) if anything is received at the client at all?

If nothing is received, then this might be more of a question for the "regular" forums as it sounds like an issue on the server side.

If you can see something received in the log, then paste me the XML please, and we will find the problem!!

Best
Thomas

Posted: 10 Apr 2009, 07:59
by manx
Sorry for the late reply.

Can you please tell me where i can get the xml file because as of now i have a debug.log in the onjoinroom eventhandler and that debug.log is never printed .

If you can tell me the location then ill post the xml.

I also tried to send a helper.Updateroomlist from server side but on client side it returns the number of users in the current active room as 0.

Any work around for this...

Posted: 10 Apr 2009, 08:12
by ThomasLund
if you connect with debug = true on the client when making the connection to the server + implement a callback for DebugMessages, then it should be printed on the client side player.log (or unity console if you run in editor).

The XML send + received will be printed there.

/Thomas

Posted: 13 Apr 2009, 09:02
by manx
I kind off figured it out..
I was using custom login as we wanted to authenticate a person before adding him to a room.
So when server sends a logOk message to client i am making a getroomlist() call from the client .
and it works..

Thanks for your help ..

Posted: 13 Apr 2009, 09:12
by ThomasLund
Anytime!!!

And happy it works for you

Posted: 03 May 2009, 19:14
by Real McCoy
I have something strange with joining room.

I made sample for other problem solving but observed new issue.

On client side I trying to create new room as

Code: Select all

sfc.CreateRoom()

catch OnRoomAdded and call

Code: Select all

sfc.JoinRoom()

in this event handler.

In OnDebugMessage I got following:

Code: Select all

[Sending]: <msg t='sys'><body action='createRoom' r='11'><room tmp='1' gam='1' spec='0' exit='1'><name><![CDATA[qqq]]></name><pwd><![CDATA[]]></pwd><max>20</max><vars></vars></room></body></msg>

[ RECEIVED ]: <msg t='sys'><body action='roomAdd' r='0'><rm id='4' priv='0' temp='1' game='1' max='20' spec='0' limbo='0'><name><![CDATA[qqq]]></name><vars /></rm></body></msg>, (len: 162)
SmartFoxError: requested room to join does not exist!
[ RECEIVED ]: <msg t='sys'><body action='joinOK' r='4'><pid id='1'/><vars /><uLs r='4'><u i='0' m='0' s='0' p='1'><n><![CDATA[User1]]></n><vars></vars></u></uLs></body></msg>, (len: 160)
[ RECEIVED ]: <msg t='sys'><body action='uCount' r='4' u='1' s='0'></body></msg>, (len: 66)

So it looks like room created and user joined to it, but error message confusing me.

And one more: I get created room by name from other client instance then try to join it. As result just message SmartFoxError: requested room to join does not exist! is out to debug console. Nothing else.

Could somebody explain how to create and join rooms?