Request handler - Rooms

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

LuffyGray
Posts: 32
Joined: 06 Feb 2017, 16:01

Request handler - Rooms

Postby LuffyGray » 23 Mar 2017, 10:24

I'm having a wee issue with my request handlers, my Zone extension will recieve a custom handler using addRequestHandler but doing the same on the Room extension results in an error that the custom handler doesn't exist.

I'm trying to get the code to run on the Room extension instead of the zone extension.

Room Code
Image

Server Error:
Image

Client Code:
Image

Server Item Handler:
Image
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Request handler - Rooms

Postby Lapo » 23 Mar 2017, 10:36

The error you've reported is referencing a Zone Extension, not a Room one (it says Level: Zone)
If you were expecting to call a Room Extension, it isn't.

Keep in mind that to call a Room Extension you need to add a 3rd parameter in your ExtensionRequest referencing the Room you want to "talk to".

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
LuffyGray
Posts: 32
Joined: 06 Feb 2017, 16:01

Re: Request handler - Rooms

Postby LuffyGray » 23 Mar 2017, 10:57

Lapo wrote:The error you've reported is referencing a Zone Extension, not a Room one (it says Level: Zone)
If you were expecting to call a Room Extension, it isn't.

Keep in mind that to call a Room Extension you need to add a 3rd parameter in your ExtensionRequest referencing the Room you want to "talk to".

cheers


Thank you, I didn't catch that in the documentation

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 77 guests