cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.25k stars 7.06k forks source link

js_cocos2dx_Node_removeFromParentAndCleanup : wrong number of arguments #15093

Open lkknguyen opened 8 years ago

lkknguyen commented 8 years ago

Please help on this jsb bug. This code

cb_close: function()
    {
        this.fadeexit();
        this.runAction( cc.sequence(
            cc.delayTime( 0.5 ),
            cc.callFunc( this.removeFromParent.bind(this, true), this )) );
    },

return an error message js_cocos2dx_Node_removeFromParentAndCleanup : wrong number of arguments

musikov commented 8 years ago

callFunc passes additional sender argument to removeFromParent function. Use cc.removeSelf() instead