After schedule a function getChildByTag give an error otherwise work fine????

{
CCLabelTTF loadLabel = CCLabelTTF::labelWithString;
loadLabel~~>setPosition);
loadLabel~~>setTag;
pscene~~>addChild; //pscene is a CCScene object
pscene~~>schedule, 0.5f); ———~~
CCFiniteTimeAction* delay1 = CCDelayTime::actionWithDuration;
CCFiniteTimeAction* Func1 = CCCallFunc::actionWithTarget);
pscene~~>runAction); —————
}
void LevelManager::test
{
CCLabelTTF
removeloadLabel = (CCLabelTTF *)(pscene->getChildByTag(99));
}

I am using any one condition at a time
Now If I am using 1 condition then I got an error but if I am using 2 condition, then it works fine…
What the difference between these two senario???
Thanks

I don’t catch your meaning fully?
Did you mean “pscene->schedule( schedule_selector(LevelManager::test), 0.5f);” would get error?
If so, what’s the error?

Just I More explain in detail—>I have two senario One give an error and one working fine…See below

This Given below Section Give an error

{
CCLabelTTF loadLabel = CCLabelTTF::labelWithString;
loadLabel~~>setPosition);
loadLabel~~>setTag;
pscene~~>addChild; //pscene is a CCScene object
pscene~~>schedule, 0.5f);
}
void LevelManager::test
{
CCLabelTTF
removeloadLabel = (CCLabelTTF**)); //**Give error on this line*
}

This Given below Section working fine

{
CCLabelTTF* loadLabel = CCLabelTTF::labelWithString(“Loading”, “osakasans.ttf”, 64);
loadLabel~~>setPosition);
loadLabel~~>setTag(99);
pscene~~>addChild; //pscene is a CCScene object
CCFiniteTimeAction* delay1 = CCDelayTime::actionWithDuration;
CCFiniteTimeAction* Func1 = CCCallFunc::actionWithTarget);
pscene~~>runAction(CCSequence::actions(delay1, Func1, NULL));
}
void LevelManager::test()
{
CCLabelTTF* removeloadLabel = (CCLabelTTF**)); //**working fine*
}

So I want to know why it give an error while using schedule???
Thanks for your response

Hi, see the declare of schedule callback function, ’typedef void (CCObject::SEL_SCHEDULE);’
So if you wanna use schedule function, your test callback function must be defined as follow:
<pre>
void LevelManager::test // ccTime dt parameter is necessary.
{
pscene->unschedule); // because test callback function is invoked once, so it need to be unscheduled.
CCLabelTTF
removeloadLabel = (CCLabelTTF*)(pscene->getChildByTag(99)); // working fine
}

Please try again.:)

Sorry James it also not Work,I did the same as you told.
Any other reason???

Hi, do you mind to make a demo which reproduces this issue and upload as attachment or email to me ?