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
ReferenceError: DataStream is not defined in wechat
-
- Posts: 4
- Joined: 16 Nov 2018, 02:09
Re: ReferenceError: DataStream is not defined in wechat
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.
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
The SmartFoxServer Team
-
- Posts: 4
- Joined: 16 Nov 2018, 02:09
Re: ReferenceError: DataStream is not defined in wechat
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
Yuejun Zhang
Re: ReferenceError: DataStream is not defined in wechat
We sent you an email yesterday, did you get it?
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: ReferenceError: DataStream is not defined in wechat
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!
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!
Re: ReferenceError: DataStream is not defined in wechat
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
The SmartFoxServer Team
Re: ReferenceError: DataStream is not defined in wechat
Bax wrote: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.
Hi Bax,
I face the same issue of import HTML5 JS API in CocosCreator too.
I got this error in CocosCreator:
Code: Select all
load script [../plugins/sfs2x-api-1.7.16] failed : ReferenceError: DataStream is not defined
If you need a testing project, please PM me I will send it to you.
Thank you.
Re: ReferenceError: DataStream is not defined in wechat
Currently our JavaScript API are targeted at main desktop and mobile browsers. It is hard for us to test other environments. If you like we can provide the API source code. Maybe manually importing the DataStram library in your project is enough?
If you want to give it a try, please contact us by email referencing this thread.
Thank you.
If you want to give it a try, please contact us by email referencing this thread.
Thank you.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Return to “SFS2X HTML5 / JavaScript API”
Who is online
Users browsing this forum: No registered users and 57 guests