ReferenceError: DataStream is not defined in wechat

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

zhangyuejun
Posts: 4
Joined: 16 Nov 2018, 02:09

ReferenceError: DataStream is not defined in wechat

Postby zhangyuejun » 20 Nov 2018, 10:11

there is a error when we use html5 JS api v1.7.13 in wechat small game platform, ReferenceError: DataStream is not defined .
I think the wechat plateform do not support some javascript language syntax. for example , they do not support , var AX=BX=5, this will report BX is not defined.
I checked the code about "ReferenceError: DataStream is not defined" . the code is : "function(e,t,n){(function(e){var n;DataStream=function(e,t,n)"
, it turns the wechat platform do not support the way which define the class "DataStream".
so can SFS rewrite the API with a very basic and common way ? or change the way to define the class to see if it can fix the problem. I know it is a little troublesome , and asked too much. but we are a core fan of SFS in china, we bought several SFS licences and also recommended SFS to some of our busisness partners.
and also the wechat is most powerful platform in china.
Hope we can fix the problem and get our game published in wechat.
Thanks
Yuejun zhang
User avatar
Bax
Site Admin
Posts: 4482
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: ReferenceError: DataStream is not defined in wechat

Postby Bax » 20 Nov 2018, 17:33

I'm sorry, but this is not something we can do. The reason is that the final API js file is generated using Webpack, so we have a very little control over the final output.
Additionally, DataStream is a library class we import, but we didn't develop it.
What we can do is to send you the source code of the API, so maybe you can make the changes you need for your specific scenario.
Paolo Bax
The SmartFoxServer Team
zhangyuejun
Posts: 4
Joined: 16 Nov 2018, 02:09

Re: ReferenceError: DataStream is not defined in wechat

Postby zhangyuejun » 21 Nov 2018, 00:37

Thanks for relpy. It will very helpful if you can send us the souce code of the API. if we can fix the problem. we can send you the working wechat version api. please email me the source code to zhangyuejun@yahoo.com .
Yuejun Zhang
User avatar
Bax
Site Admin
Posts: 4482
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: ReferenceError: DataStream is not defined in wechat

Postby Bax » 22 Nov 2018, 10:10

We sent you an email yesterday, did you get it?
Paolo Bax
The SmartFoxServer Team
MrHaka
Posts: 4
Joined: 10 Apr 2017, 04:30

Re: ReferenceError: DataStream is not defined in wechat

Postby MrHaka » 25 Nov 2019, 11:41

Hi Bax!
I have the same problem when using for CocosCreator IDE. Can you send me a copy. If i can fix, i'll send back for you.
My Email: janicegamemaster@gmail.com
Hope you feedback. Thanks!
User avatar
Bax
Site Admin
Posts: 4482
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: ReferenceError: DataStream is not defined in wechat

Postby Bax » 26 Nov 2019, 08:19

MrHaka wrote:Hi Bax!
I have the same problem when using for CocosCreator IDE. Can you send me a copy. If i can fix, i'll send back for you.
My Email: janicegamemaster@gmail.com
Hope you feedback. Thanks!


Please send us an email with your request. Also, we'd like to have more information on the issue you are facing. Thank you.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X HTML5 / JavaScript API”

Who is online

Users browsing this forum: No registered users and 1 guest