Extension Error!!

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

wadapav
Posts: 14
Joined: 29 Oct 2018, 11:00

Extension Error!!

Postby wadapav » 16 Nov 2018, 14:27

Hello,

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)
Last edited by wadapav on 17 Nov 2018, 19:56, edited 2 times in total.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Extension Error!!

Postby Lapo » 16 Nov 2018, 16:21

Hi,
I don't think the error you have reported is triggered by the code you showed here.
The line of the error points to an internal lib, but it seems something calling the library is triggering it.

What exactly is triggering the error? Is it possible it's due to a client request?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 20 guests