Error in GetRoomList example?
Posted: 05 Jan 2009, 17:48
In the example usage for GetRoomList:
SFSEvent.onRoomListUpdate += OnRoomListUpdate;
smartFox.GetRoomList()
public void OnRoomListUpdate(Hashtable roomList)
{
// Dump the names of the available rooms in the current zone
foreach (Room room in roomList)
Trace.WriteLine(room.GetName())
}
I get an error on the foreach line:
Unable to cast object of type 'System.Collections.DictionaryEntry' to type 'SmartFoxClientAPI.Data.Room'.
I am using version 1.0 final, any help with this would be much appreciated!
SFSEvent.onRoomListUpdate += OnRoomListUpdate;
smartFox.GetRoomList()
public void OnRoomListUpdate(Hashtable roomList)
{
// Dump the names of the available rooms in the current zone
foreach (Room room in roomList)
Trace.WriteLine(room.GetName())
}
I get an error on the foreach line:
Unable to cast object of type 'System.Collections.DictionaryEntry' to type 'SmartFoxClientAPI.Data.Room'.
I am using version 1.0 final, any help with this would be much appreciated!