Here's my problem.
I have the following extension attached to one room in my zone.
Code: Select all
function init ()
{
trace ("Challenge Extension Loaded");
}
function destroy ()
{
trace ("CHALLENGE EXTENSION DESTROYED");
}
function handleRequest (cmd, params, user, fromRoom)
{
trace ("NEW REQUEST on the login extension???");
switch (cmd)
{
case "asd" :
trace ("ASD request recieved");
default :
trace ("ERROR - Command not defined");
break;
}
}
function handleInternalEvent (evt)
{
trace("New event >>> "+evt.name);
if (evt.name == "userJoin")
{
var r = evt.room;
var u = evt.user;
var c = Math.random () * 1000;
u.properties.put ("chips",);
trace ("User " + u.getName () + " has " + c + " chips");
delete r;
delete u;
delete c;
}
}
The extension is attached from the server config.xml file as this rooms are supposed to be permanent (created by the server itself).
I can see the extension if I look at that room with the admin tool. Problem is that I can't see any message when the userJoins. Bigger problem is that even if I press the reloadExtension button in the admin tool I can't see the init nor the destroy traces I set in the trace window from the admin console.
This is the xml attached inside the Room Node in the config file. But as I told you before, the extensions seems to be attached corectly.
Code: Select all
<Extensions>
<extension name="gameRoom" className="thu_challenge.as" type="script" />
</Extensions>
Do you think I'm doing something wrong? What tests do you sugest?