SmartFoxServer 2X with Cocos Creator

Hi guys, Im new in Cocos Creator, and I want to implement smartfoxserver 2x for my multiplayer game in web platform.
I tried import sfs2x api js file in Cocos Creator, but face some compile errors:
With “Import As Plugin” (Checked)

  1. Run in simulator error: Simulator: ScriptEngine::runScript script sfs2x-api, buffer is empty!
  2. Run in browser error: Uncaught TypeError: Cannot read property ‘SFS2X’ of null

Without “Import As Plugin” (Unchecked)

  1. Run in simulator error: Simulator: ERROR: ReferenceError: Can’t find variable: DataStream, location: assets/scripts/lib/sfs2x-api.js:3479:25
  2. Run in browser error:
    Uncaught ReferenceError: DataStream is not defined
    at Object. (sfs2x-api.js:6)
    at Object. (sfs2x-api.js:6)
    at n (sfs2x-api.js:6)
    at Object. (sfs2x-api.js:7)
    at n (sfs2x-api.js:6)
    at Object. (sfs2x-api.js:6)
    at n (sfs2x-api.js:6)
    at Object. (sfs2x-api.js:6)
    at n (sfs2x-api.js:6)
    at Object. (sfs2x-api.js:7)

Download link:
SmartFoxServer2X Javascript API

I really appreciate if someone could guide me the sfs2x integration. Thank you.

Buzz ! Do you have any tutorial about this problem ?

Sorry, don’t have. I end up decided not using smartfox, instead using signalr.

Which version of smartfoxserver are you using?