onPrivateMessage - different rooms

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

Moderators: Lapo, Bax

padde
Posts: 7
Joined: 25 Nov 2010, 12:54

onPrivateMessage - different rooms

Postby padde » 25 Nov 2010, 13:03

Hello everyone!

As the subject already implies, I have some trouble sending private messages across different rooms. I'm sending the userID and the roomID, but this simply does not help. If two users are in the same room, everything works fine, but not across different rooms.

I already use the 1.2.7-rc1.dll, because I already had some trouble with the Web Player funcionality of Unity 3 and the private message sending in general. In fact, private messages in the same room only work with this new *.dll. So maybe there is still a bug concerning private messages across different rooms?

I'd appreciate any slightest help. Thanks in advance!

Patrick

Edit: Maybe I should have mentioned that the subject is called "onPrivateMessage" because on the recipient side this method is not fired if the sender is in a different room. Thanks for your attention.
fernando24691
Posts: 30
Joined: 20 Oct 2010, 19:37

Postby fernando24691 » 23 Dec 2010, 22:22

I have similar problems with private messaging. :)

I have been testing my demo with 2 users (let them be user1 and user2). Now I will explain what is basically happening.

If both users log in the same room, they are able to send & receive private messages. But, if user1 (for example) joins a new room, and leaves the current one (in my case), then he is not sending messages anymore, only receiving. Of course user2 is sending & receiving, and I think he is also receving, since OnPrivateMessage event is not fired when user1 sends (so I guess that the problem is with user1 or even with the server). That is my opinion, that the problem is a "sending" problem. :?

Then, if user1 or user2 joins each other room (no matter who left first, I have tested all cases), then everyone is in the same room and they can send & receive with no problems. But again, and again no matter who arrived last, the first user leaving the room will not be able to send messages, like the case I mentioned above.

There is one extra situtation, In which user2 logs in a diferent room from where user1 is. Then no one is sending messages, until they meet, like I mentioned above, no matter in which room.

I don't know if there is some problem with my code (I hope not) :roll: , or it is maybe happening to other people.

I use the last api: http://www.smartfoxserver.com/forums/viewtopic.php?t=8572. The same thing happens either in client or webplayer.

Thank you for the atention. :D
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 24 Dec 2010, 11:12

Hi,

I poked the SFS guys and this is "by design" - or "by shortcomming" of SFS1. They promised to write here later with some workaround ideas.

Just so you dont think this is a bug that will be fixed in the api

/Thomas
fernando24691
Posts: 30
Joined: 20 Oct 2010, 19:37

Postby fernando24691 » 24 Dec 2010, 12:53

Thank you so much :). I hope SFS developers could help me with some solution.

Anyway, if I'm not wrong, you told that the "error" I mentioned in the previous post is not an error/bug itself, but a design "lack".

Then, will SFS2 have that feature included?.

In the worst case, would it be difficult to pass my project from SFS1 to SFS2?

Thanks, merry christmas!
:D
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 24 Dec 2010, 21:00

SFS2X should not have this design issue.

How big a job a port is, depends solely on your project itself. It can take from a few hours to weeks.

So cant give you any advice here, sorry.

And merry xmas to you also

/Thomas
fernando24691
Posts: 30
Joined: 20 Oct 2010, 19:37

Postby fernando24691 » 24 Dec 2010, 23:34

I took a look over SFS2X and, since I'm a noobish developer (and actually it is a little big step what I have been done with my project until now :)) I'm afraid of doing any port (and survive to it), so I'd better wait for some help from SFS people.

Anyway, and in worst of all cases, I'd port it. :?

Goodbye!
fernando24691
Posts: 30
Joined: 20 Oct 2010, 19:37

Postby fernando24691 » 25 Dec 2010, 17:35

SOLVED! :)

With a custom extension that supplied "SendPrivateMessage" and did not care about room id's.

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 7 guests