zxh1982
zxh1982
I use pomelo-jsclient-websocket in jsb prompted wrong, is not defined window. I pre-var windows = {}, and tips Protocol does not exist. I use pomelo-jsclient-scoet.io in jsb prompted pomelo-client.js: 84:...
cocos2d jsb no node.js environment, if you want to use in cocos2d jsb Pomleo Clinet need to c language version of the api to bind to js on?
pomelo-jsclient-websocket need Browser environment?
var Protocol = window.Protocol; var Package = Protocol.Package; var Message = Protocol.Message; var EventEmitter = window.EventEmitter; ///---------------------------- In cocos2d jsb environments Protocol, EventEmitter are not defined!
Only in Cocos2d jsb js to cocos2d-x binding and js built-in data types, no other things. js virtual machine using SpiderMonkey (SpiderMonkey is Mozilla's JavaScript engine written in C /...
require("jsb.js"); require("ByteBuffer.min.js"); require("ProtoBuf.min.js"); Cocos2d: Get data from file(buffer.jsc) failed! Cocos2d: Get data from file(fs.jsc) failed! Cocos2d: (evaluatedOK == JS_FALSE) ## Cocos2d: JS: /Users/zhangxiaokou/Library/Application Support/iPhone Simulator/7.0/Applications/5E612079-971A-4BB1-BD4D-C163EB4A62F9/Documents//ccb/MainScene.js:12:TypeError: ProtoBuf.protoFromFile(...) is null require("jsb.js"); require("buffer.js");...
cocos2d-x is used spidermonkey js virtual machine, but there is no mechanism for package management node.js
In your way, then there is either an error: jsb: ERROR in JSB_core_executeScript: Error executing script #0 0x15800028 /Users/zhangxiaokou/Library/Application Support/iPhone Simulator/7.0/Applications/91149A02-90AD-4329-A687-3B2EE7ECCACA/Library/Caches/ccb/main.js:5 (0x15fa13c8 @ 43) /Users/zhangxiaokou/Library/Application Support/iPhone Simulator/7.0/Applications/91149A02-90AD-4329-A687-3B2EE7ECCACA/Library/Caches/ccb/main.js:5:0 Error: Error executing...
Still the same error. cocos2d jsb support jsc (js file will be compiled into jsc binary byte code). Can provide protobufjs of jsc files and all associated dependent libraries.