main.asc TypeError trying to set a shared object property in application.onConnect
FMS 3.5.
Basically trying to update a "userlist" shared object everytime someone connects.
Administration console live log reads:
"Sending error message: ...\main.asc: line 12: TypeError: this.usersSO has no properties"
I'm connected ok. Here's the server code. Doesn't like "usersSO.setProperty()" call:
application.onAppStart = function()
{
this.uniqueID=1;
this.users = new Object();
this.usersSo = SharedObject.get("userlist", false);
}
application.onConnect = function(client) {
application.acceptConnection(client);
client.call("setUserID", null, this.uniqueID);
this.users["user_" + this.uniqueID] = client;
this.usersSO.setProperty("user_" + this.uniqueID, client);
this.uniqueID++;
}
