Page 1 of 1

room = _server.getCurrentRoom();

Posted: 20 Sep 2008, 05:17
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...

Posted: 22 Sep 2008, 07:32
by Lapo
It works only for extensions at Room Level and it returns the Room object where the extension is attached to.

Posted: 22 Sep 2008, 07:47
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

Posted: 22 Sep 2008, 07:52
by Lapo
its return the room object on the instance of the extension .. as we can have muliple instances of the same extension
Yes

Posted: 22 Sep 2008, 08:02
by Sandyx
rocking :)