Error when Instantiating SmartFox

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

Moderators: Lapo, Bax

lampshade
Posts: 18
Joined: 04 Dec 2010, 19:14

Error when Instantiating SmartFox

Postby lampshade » 15 Mar 2011, 20:18

Hi, for some reason I am getting an error. I just want to keep a running count of the users connected to a room:


Code: Select all

//All System references used
public class ClientCount : MonoBehaviour {

    public SmartFoxClient sfc;
    private void Start() {
        sfc = SmartFox.Connection; //fixed the problem!
        //sfc = new SmartFoxClient(true);
        Debug.Log("ActiveRoom: " + sfc.GetActiveRoom() + " name: " + sfc.myUserName);
       //
    }
}


Getting the error:

ArgumentException: Key duplication when adding: >
System.Collections.Hashtable.PutImpl (System.Object key, System.Object value, Boolean overwrite)
System.Collections.Hashtable.Add (System.Object key, System.Object value)
SmartFoxClientAPI.Util.Entities.Initialize ()
SmartFoxClientAPI.SmartFoxClient..ctor (Boolean debug)
TavernClientCount.Start () (at Assets/Networking/ClientCount.cs:16)

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 18 guests