OnJoinRoom is not fired

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

manx
Posts: 11
Joined: 25 Mar 2009, 10:05

OnJoinRoom is not fired

Postby manx » 08 Apr 2009, 08:47

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.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 08 Apr 2009, 20:57

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
manx
Posts: 11
Joined: 25 Mar 2009, 10:05

Postby manx » 10 Apr 2009, 07:59

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...
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 10 Apr 2009, 08:12

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
manx
Posts: 11
Joined: 25 Mar 2009, 10:05

Postby manx » 13 Apr 2009, 09:02

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 ..
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 13 Apr 2009, 09:12

Anytime!!!

And happy it works for you
User avatar
Real McCoy
Posts: 21
Joined: 06 Dec 2008, 12:01

Postby Real McCoy » 03 May 2009, 19:14

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?

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 19 guests