Im extremely sorry to be annoying you today with my pathetic code but I just cannot see where I have gone wrong.
My extension is supposed to be called and then send a amount of coins back to the client at the moment the amount of coins is set to 10 as I have not yet added DB Functions, My code follows.
Code: Select all
Code: Select all
function init()
{
trace("Coin System Loaded");
}
function destroy()
{
// Here we release resources before the extension is destroyed
}
function handleRequest(cmd, params, user, fromRoom)
{
if (cmd == "get")
{
var response = {};
response._cmd = "coinGet"
response.coins = "10"
_server.sendResponse(response, -1, null, [user], "xml");
}
}
function handleInternalEvent(evtObj)
{
trace("Event: " + evtObj.name);
}
And the error I am seeing in the console:
Code: Select all
12:34:06.955 - [ WARNING ] > Error in extension [ coin.as ]: TypeError: Cannot c
all method "keySet" of null (coin.as#1192) Internal: -383 -- Line number: (Main
Lib line: 1192)