Page 1 of 1

Error when Instantiating SmartFox

Posted: 15 Mar 2011, 20:18
by lampshade
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)