ROOM_VARIABLES_UPDATE Event BUG??

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

Moderators: Lapo, Bax

charles
Posts: 13
Joined: 23 Feb 2013, 09:08

ROOM_VARIABLES_UPDATE Event BUG??

Postby charles » 16 Oct 2013, 06:37

Here are the API :http://docs2x.smartfoxserver.com/api-docs/csharp-doc/Index.html
It said, getting the changedVars should be List<string> type,but it alawys occur InvalidCastException.

And ,I using baseEvent.Parmas["changedVars "].GetType() to print what type it is.
The result is ArrayList.
Is it a bug? or API incorrect?
User avatar
Bax
Site Admin
Posts: 4610
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: ROOM_VARIABLES_UPDATE Event BUG??

Postby Bax » 16 Oct 2013, 11:26

If you use the API under Unity, the returned type is ArrayList; if you use the API natively under Windows 8 / Windows Phone 8, the type is List.
Anyway you can cast to the IList interface, which is implemented by both collections.
We will update the api doc to identify the returned type as IList in the next API update.
Thanks for pointing out.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X C# API”

Who is online

Users browsing this forum: Google [Bot] and 18 guests