JsonData does not hold a double.

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

shaitaaan
Posts: 11
Joined: 02 Apr 2009, 04:29
Contact:

JsonData does not hold a double.

Postby shaitaaan » 25 Jul 2009, 10:36

Strange problem...

The client is not able to typecast data sent which is supposed to be double and disconnects.

For example, the server sends x = 23.0D as a double.
But when it arrives at the client, x = 23.

Now when you say, double x = (double)data["x"];
The client says JsonData does not hold a double and disconnects. I hope I am clear.

Help!!!!!

Thank you.
shaitaaan
Posts: 11
Joined: 02 Apr 2009, 04:29
Contact:

Postby shaitaaan » 26 Jul 2009, 11:00

Figured out the problem... Miscommunication between server and client programmers. The server was using floats.
Sorry. :!:
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 26 Jul 2009, 16:20

No problemo :-)

Rather voice the potential issue than holding back and letting a bug slip by

/Thomas

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 1 guest