GetRoomList(); bug ?

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

Moderators: Lapo, Bax

lhqhappy
Posts: 9
Joined: 14 Jul 2009, 15:10

GetRoomList(); bug ?

Postby lhqhappy » 14 Jul 2009, 15:31

I have a problem
when I join my room(the room setted Variables when I create) if I use sfs.GetRoomList(); I can't get Room Variables, It's null ! if I comment this function (sfs.GetRoomList(); ) It's run ok :cry:

Thanks!
Noolza
lhqhappy
Posts: 9
Joined: 14 Jul 2009, 15:10

Postby lhqhappy » 15 Jul 2009, 00:19

:shock: waiting! who can help me!
Noolza
User avatar
Lapo
Site Admin
Posts: 21092
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 16 Jul 2009, 12:30

Hi,
you shouldn't call GetRoomList after you have joined a Room.
GetRoomList needs to be called once to get the list of available rooms.
From that moment on you will receive smaller updates via the onRoomAdded onRoomDeleted events.

Calling GetRoomList after you have joined one or more rooms will erase your current local data. Simply avoid it and it will work wonders. Plus you can check the examples if you have any doubts.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
lhqhappy
Posts: 9
Joined: 14 Jul 2009, 15:10

Postby lhqhappy » 17 Jul 2009, 01:09

I see !
Thanks your answer!
I must GetRoomList before I join any room . :lol:
Noolza
lhqhappy
Posts: 9
Joined: 14 Jul 2009, 15:10

Postby lhqhappy » 17 Jul 2009, 02:30

I change my GetRoomList() before create my room .I can get my room's Variables but other room's Variables is null.
so If I want get all room's Variables I can't use GetRoomList() anytime. is't it? Thanks!

If it 's right . How can I get allroom Variables in my room!
Hope your help! :) Thanks!
Noolza
User avatar
Lapo
Site Admin
Posts: 21092
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 17 Jul 2009, 07:01

You don't get the other room's variables.
It would generate too much traffic. Room Variables can be accessed when you have joined the Room.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 2 guests