Cocos creator to cocos2dx update function not working

yeah as you can see createScene is not static because if i make it static then i cant run the init function under createScene so i make it non-static and then to run it i do so

scheduleUpdate() is causing the HASH_FIND_PTR(_hashForUpdates, &target, hashElement); error

did you try in cocos new ... project?

yes i have tried it and it run and in this project also it run if you create separate files like HelloWorld.h and cpp and there you create an empty scene and run it then the update function get called

You are saying cocos new ... and add scheduleUpdate(); line causes your error?

i have checked it now in this project also in the GameScene cpp file in createScene function if you create an empty scene like this
Scene* GameScene::createScene()

{

auto scene = GameScene::create();

return scene;

}

it works without creator reader

but with creator scene it gives that error

Can you post a project that shows this? I want to see scheduleUpdate() crashing in a working project. If you can’t I can probably make one faster than taking apart one.

this is the project you are not understanding it is the problem related with cocos creator scene if you remove
reader = creator::CreatorReader::createWithFilename(“creator/Scene/helloworld.ccreator”);
reader->setup();
Scene * GameScene = reader->getSceneGraph();
GameScene::init(GameScene);

from createScene function in GameScene cpp file

and put this
auto scene = GameScene::create();

then the scheduleUpdate work but if we create scene from cocos creator then the scheduleUpdate dont work

I understand. But I don’t see this.

Let me look at this more

so you are saying that in your project scheduleUpdate work and udpate method get call with cocos creator scene

I’m just using what you provided. I should load 1.9.3 and the plugin and test start to finish.

yeah ok with that you will understand more clearly what the problem is

I understand the problem :slight_smile: I’d be happy to let someone else, if you like. I surely have many other issues to attend to.

ok can you pass this problem to zhangxm because i have read many of his post on cocos creator and he solved many issues related to cocos creator

please do what you have to do but give me a solution for this problem i want to develop my game with cocos creator and cocos2dx and i am stuck here