Smartfox Server v : 2.9.0
Unity V: 5.3.5
Smartfox Client : 1.6.4.0
InvalidCastException: Unable to cast object of type 'Int32' to type 'Double'.
Sfs2X.Entities.Data.SFSObject.GetValue[Double] (System.String key)
Sfs2X.Entities.Data.SFSObject.GetDouble (System.String key)
user.GetVariable("variableName").GetDoubleValue() is running without exception on Android , IOS , Windows 10 PC , Windows Phone 8.1&10 , Unity Editor , but on WebGL exception occur.
InvalidCastException 'Int32' to type 'Double'.
-
- Posts: 30
- Joined: 30 Apr 2016, 07:23
- Location: Turkey
Re: InvalidCastException 'Int32' to type 'Double'.
We are investigating and should be able to report to you tomorrow.
We just need to know which WebGL publishing settings you are using... is it a development build or not? did you enable exceptions?
We just need to know which WebGL publishing settings you are using... is it a development build or not? did you enable exceptions?
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: InvalidCastException 'Int32' to type 'Double'.
Can you show how you set the variable?
From our initial tests, if you pass the value as a double (for example 27.0), then everything works fine.
If you pass it as an integer (27), then the invalid cast exception occurs, but in the Editor too, not only in the final WebGL build.
From our initial tests, if you pass the value as a double (for example 27.0), then everything works fine.
If you pass it as an integer (27), then the invalid cast exception occurs, but in the Editor too, not only in the final WebGL build.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: InvalidCastException 'Int32' to type 'Double'.
Good news! I was able to reproduce the issue with SFS2X v2.9.0, but in later releases everything works fine.
Please download and install the latest patch available here: http://smartfoxserver.com/download/sfs2x#p=updates
Please download and install the latest patch available here: http://smartfoxserver.com/download/sfs2x#p=updates
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Who is online
Users browsing this forum: No registered users and 25 guests