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

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

ROOM_VARIABLES_UPDATE Event BUG??

Post by charles »

Here are the API :http://docs2x.smartfoxserver.com/api-do ... 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: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: ROOM_VARIABLES_UPDATE Event BUG??

Post by Bax »

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
Post Reply