I have written my code in following way in cocos2d.
id actionTo = [CCFadeOut actionWithDuration:4.0f];
id actionTo0 = [CCSequence actionWithDuration:2.0f];
if (m < enemyNumber)
id actionTo1 = [CCCallFunc actionWithTarget:self selector:@selector(goToNextScene)];
else
id actionTo1 = [CCCallFunc actionWithTarget:self selector:@selector(goToEndScene)];
id actionSeq = [CCSequence actions:actionTo, actionTo0, actionTo1, nil];
[targetE runAction: [CCSequence actions:actionSeq, nil]];
error: expected expression before 'id'
I am getting the above error. Should not we use (id) in if condition ? I want to get called two selectors by using the if- else condition. How can I make it ? Thank You.