Hi,
In my IntroMenu.cpp, I have got the following code:
void IntroMenu::setUpIntroMenu()
{
//Code here...
CCLabelTTF *coinsLabel = CCLabelTTF::labelWithString("Coins:", CCSizeMake(200.0f, 30.0f),CCTextAlignmentLeft,"Marker Felt", 23);
CCMenuItemLabel * buyCoinItem = CCMenuItemLabel::initWithLabel(coinsLabel, this,menu_selector(IntroMenu::buyCoin));// ##COMPILATION ERROR HERE##
//Code here...
}
void IntroMenu::buyCoin()
{
//Some code...
}
I get the following error:
IntroMenu.cpp:504: error: cannot call member function 'bool cocos2d::CCMenuItemLabel::initWithLabel(cocos2d::CCNode*, cocos2d::SelectorProtocol*, void (cocos2d::SelectorProtocol::*)(cocos2d::CCObject*))' without object
And, for other similar cases, I have got this error:
IntroMenu.cpp: error: Semantic Issue: Call to non-static member function without an object argument
How can I solve this issue ?
Thanks