room = _server.getCurrentRoom();

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

Moderators: Lapo, Bax

Post Reply
Sandyx
Posts: 21
Joined: 06 Sep 2008, 10:54

room = _server.getCurrentRoom();

Post by Sandyx »

hi

when i call

Code: Select all

room = _server.getCurrentRoom();
on a server extension , does it return the room object of that instance of that extension .

create game .... new game_ext() ... roomid=10
create game .... new game_ext() ... roomid=11

in any function of game_ext() .... where theroom id is .. 10 .. and i call room = _server.getCurrentRoom(); .... would room.getId() return 10 ...

not sure if this makes sense...
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

It works only for extensions at Room Level and it returns the Room object where the extension is attached to.
Lapo
--
gotoAndPlay()
...addicted to flash games
Sandyx
Posts: 21
Joined: 06 Sep 2008, 10:54

Post by Sandyx »

hi lapo

that what i meant .... i am using this on the room extension level, not zone ...just wanted to confirm if ... its return the room object on the instance of the extension .. as we can have muliple instances of the same extension

Thanks
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

its return the room object on the instance of the extension .. as we can have muliple instances of the same extension
Yes
Lapo
--
gotoAndPlay()
...addicted to flash games
Sandyx
Posts: 21
Joined: 06 Sep 2008, 10:54

Post by Sandyx »

rocking :)
Post Reply