am geting an error on the following line
frames->addObject(CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(frame->getCString));
the error shown is
Multiple markers at this line
- candidate is:
- no matching function for call to 'cocos2d::CCSpriteFrameCache::spriteFrameByName()'
The code is as follows
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("moles.plist");
mole = CCSprite::createWithSpriteFrameName("b0011.png");
and
void HelloWorld::ccTouchesBegan(cocos2d::CCSet *pTouches, cocos2d::CCEvent *pEvent)
{
mole->stopAllActions();
CCArray *frames = CCArray::create();
for(int i=1; i<=11 ;i++) {
CCString *frame= CCString::createWithFormat("b%04d.png", i);
frames->addObject(CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(frame->getCString));
}
mole->runAction(CCAnimate::create(CCAnimation::create(frames,.15)));
}
Anyone know what is the error?