AS3
Hi,
In a previous development with AS2 and 1.5.5 I had a structure of a limbo lobby extension which managed users and created and joined users to the dynamic game rooms when they were enough players in the lobby, which worked fine., so for example
Code: Select all
_server.createRoom({name:"Game" + gameCount, maxU:4, isGame:true, xtName:"mgame", xtClass:"mgame.as"}, null, false, false, roomVars, null, false);
if(newRoom != null) {
var roomId = newRoom.getId();
var isJoin1 = _server.joinRoom(user1, globalRoomId, true, roomId);
var isJoin2 = _server.joinRoom(user2, globalRoomId, true, roomId);
}
I'm now trying to do the same thing with AS3 and users still get put to the room fine(checked in the Admin) but, I'm getting client side errors:
Code: Select all
[Sending]: <msg t='sys'><body action='verChk' r='0'><ver v='154' /></body></msg>
[ RECEIVED ]: <cross-domain-policy><allow-access-from domain='*' to-ports='9339' /></cross-domain-policy>, (len: 91)
[ RECEIVED ]: <msg t='sys'><body action='apiOK' r='0'></body></msg>, (len: 53)
[Sending]: <msg t='sys'><body action='login' r='0'><login z='moonminer'><nick><![CDATA[]]></nick><pword><![CDATA[]]></pword></login></body></msg>
[ RECEIVED ]: <msg t='sys'><body action='logOK' r='0'><login n='guest_18' id='20' mod='0'/></body></msg>, (len: 90)
[Sending]: <msg t='sys'><body action='getRmList' r='-1'></body></msg>
[ RECEIVED ]: <msg t='sys'><body action='rmList' r='0'><rmList><rm id='1' priv='0' temp='0' game='0' ucnt='0' lmb='1' maxu='10000' maxs='0'><n><![CDATA[global]]></n></rm></rmList></body></msg>, (len: 178)
[Sending]: <msg t='sys'><body action='autoJoin' r='-1'></body></msg>
[ RECEIVED ]: <msg t='sys'><body action='joinOK' r='1'><pid id='0'/><vars /><uLs r='1'></uLs></body></msg>, (len: 92)
[ RECEIVED ]: <msg t='sys'><body action='joinOK' r='196'><pid id='1'/><vars><var n='numPlayers' t='n'><![CDATA[2]]></var></vars><uLs r='196'><u i='20' m='0' s='0' p='1'><n><![CDATA[guest_18]]></n><vars></vars></u></uLs></body></msg>, (len: 218)
[Fault] exception, information=TypeError: Error #1009: Cannot access a property or method of a null object reference.
Fault, handleJoinOk() at SysHandler.as:231
The problem seems to be that the client-side can't get the room. Is there something different in the way this is done with AS3 or am I missing something else?
Thanks
Richard