SmartFox custom login data back to Unity

Hi,

I’m trying to read data that comes back from a custom login extension in SFS.
Normally i would use :

responseData.GetString("myInt")

to fetch the string but in my case i need to catch an integer.
What do i have to use to fetch the int ?
GetInt doesn’t exist…

If I use :

responseData.GetString("myInt")

I get an exception error :

[SFS DEBUG] ERROR: Exception thrown dispatching event. Exception: System.InvalidCastException: Cannot cast from source type to destination type.
  at SmartFoxClientAPI.Data.SFSObject.GetString (System.Object key) [0x00000] in <filename unknown>:0

Anyone ?

If you are needing to convert a string passed back from SFS to an integer you could use:

int.Parse(responseData.GetString("myInt")

If you are getting a number back from SFS:

(int)responseData.GetNumber("myInt")

Chad

yeah, i managed to get it with : smartFox.myUserId = Convert.ToInt32(responseData.Get(“myID”));