sfs pro login example

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

Moderators: Lapo, Bax

dr-mad
Posts: 22
Joined: 09 Aug 2010, 16:29
Location: Netherlands - rotterdam

Postby dr-mad » 01 Oct 2010, 15:56

hi appels i know what you mean i try to manuly set the room list i try to put this code in my client unity



Code: Select all


   public void OnLogin(bool success, string name, string error) {
      if ( success ) {
         // Lets wait for the room list

// here is what i try to fix but i dont know how to set a Hashtable
      OnRoomList();
      } else {
         // Login failed - lets display the error message sent to us
         loginErrorMessage = error;
      }
   }


as you can see i dont know how to call the OnRoomList function i never have used hashtable so i dont know how that works can you give me a hind how i can fix it with the

void OnRoomList(Hashtable roomList){

can someone please explain me how i get to use hashtable for the room list or how i fix this thx i would be happy i try this now for a day and still cant get it to work
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 01 Oct 2010, 23:23

in your OnLogin function add :

Code: Select all

smartFox.GetRoomList();

Once you call that, the OnRoomList will get called.
dr-mad
Posts: 22
Joined: 09 Aug 2010, 16:29
Location: Netherlands - rotterdam

Postby dr-mad » 02 Oct 2010, 08:33

thanks appels that really do the trick

thank you so much i was trying this for 2 days straigt :?

but thanks :wink: :D
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 02 Oct 2010, 11:05

no problem

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 2 guests