Hello! This is my first time posting a message here and I hope someone can help me with my problem. I am a new cocos2dx programmer so I am not really familiar with how to do things. This may mean I may have missed some things. Anyway, the problem is, I have a main CCB file (play.ccb) in cocosbuilder that has a SubCCB (overlay.ccb) in it.
The SubCCB has no animations whatsoever. In the main CCB, I animated the CCBNode for some changes in position. When I try to run the app I get pointed here in CCBReader.cpp
// Handle sub ccb files (remove middle node)
if (dynamic_cast(node))
{
CCBFile *ccbFileNode = (CCBFile*)node;
CCNode *embeddedNode = ccbFileNode->getCCBFileNode();
embeddedNode->setPosition(ccbFileNode->getPosition()); <-----HERE
embeddedNode->setRotation(ccbFileNode->getRotation());
embeddedNode->setScale(ccbFileNode->getScale());
embeddedNode->setTag(ccbFileNode->getTag());
embeddedNode->setVisible(true);
embeddedNode->ignoreAnchorPointForPosition(ccbFileNode->isIgnoreAnchorPointForPosition());
mActionManager->moveAnimationsFromNode(ccbFileNode, embeddedNode);
ccbFileNode->setCCBFileNode(NULL);
node = embeddedNode;
}
Xcode tells me that I get “EXC_BAD_ACCESS Code=2” there
In the console I get, Cocos2d: get data from file(overlay.ccbi) failed!
I read somewhere that this error means that cocos2d cannot find the file (overlay.ccbi)
The subCCB file (overlay.ccb) is connected to its correct custom class. This is the same for the main CCB.
Am I missing something? Am I failing to do something? Thank you for your help in advance