Page 1 of 1

ROOM_VARIABLES_UPDATE Event BUG??

Posted: 16 Oct 2013, 06:37
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?

Re: ROOM_VARIABLES_UPDATE Event BUG??

Posted: 16 Oct 2013, 11:26
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.