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

Post by dr-mad »

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:

Post by appels »

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

Post by dr-mad »

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:

Post by appels »

no problem
Post Reply