NSMutableArray funktioniert überhaupt nicht

Ich versuche Sprites zu a hinzuzufügenNSMutableArray aber es fügt sie nicht hinzu. Das habe ich:

NSMutableArray *tail;
CCSprite *block;
int j;
-(void)handleTail:(CCSprite*)pos{
    CGPoint point= pos.position;
    block = [CCSprite spriteWithFile:@"Icon-Small-50.png"];
    //Adding the tail blocks
    block.scale = .8;
    block.color = ccGREEN;
    block.position = point;
    NSLog(@"Block Pos (%f,%f)",block.position.x,block.position.y);

    //CGPoint playerPos = piece.position;

    originalPos = point;

    if ([tail count] < maxLength) {
        [tileMap addChild:block];
        [tail addObject:block];
        NSLog(@"Tail length:%i",tail.count);
        j+=1;
    }
    if (j == 3) {
        NSLog(@"J called");
        [tail removeObjectAtIndex:0];
    }   
}

Ich verstehe nicht, warum das nicht funktioniert?

Antworten auf die Frage(4)

Ihre Antwort auf die Frage