ExtensionRequest cannot take null params

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

Post Reply
User avatar
Evil-Dog
Posts: 86
Joined: 08 Mar 2011, 17:59
Contact:

ExtensionRequest cannot take null params

Post by Evil-Dog »

Hi there, I've got this line of code to send a request to the server:
GetSFS().Send(new ExtensionRequest("SetEveryoneEnteredRoom", new SFSObject(), m_Room));

I was passing null since there are no arguments to send, like this;
GetSFS().Send(new ExtensionRequest("SetEveryoneEnteredRoom", null, m_Room));
but it didn't work unless I pass an actual SFSObject that won't be used.

Is that normal?
Cause this is with unity client, the flash client can pass null and it works but not the unity client, the server never gets the request.
Thoughts?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: ExtensionRequest cannot take null params

Post by Lapo »

If you don't have any parameters in the request you can pass an empty SFSObject, which is what happens behind the hood when you pass a null in Actionscript/Flash.

Anyways, thanks for reporting, we'll add an extra constructor that doesn't require the SFSObject, for those requests.

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Evil-Dog
Posts: 86
Joined: 08 Mar 2011, 17:59
Contact:

Re: ExtensionRequest cannot take null params

Post by Evil-Dog »

Cool thanks, it's gonna be more consistent that way.
Post Reply