Page 1 of 1

Setting MAX_CLIENTS works in strange way

PostPosted: Thu 11 Jun 2015 01:03
by toby
My modules are written in Javascript.

Code: Select all
function addAttr(roomdef, nm, val)
{
var attr = new AttributeDef();
attr.setName(nm);
attr.setValue(val);
attr.setFlags(stdFlags);
roomdef.addAttribute(attr);
}

addAttr(roomDef, Room.ATTR_MAX_CLIENTS, "1"); // Union Admin shows value of 1
addAttr(roomDef, Room.ATTR_MAX_CLIENTS, 1); // Union Admin shows value of -1 <<<< HUH ???
addAttr(roomDef, someAttribute, "5");  // . . . . . . .  Union Admin shows value of 5
addAttr(roomDef, someAttribute, 5); // . . . . . . .  Union Admin shows value of 5.0


I can understand the 5 vs 5.0 difference,
but why doesn't it take the plain value (no quotes) 1 for MAX_CLIENTS ?

BTW: this is on Union Server 2.0 if that makes a difference.