我想將值playerhight和其他值添加到NSMutableArray,但它不會讓我生成,我不明白爲什麼。添加數據到NSMutableArray的問題
#import "iGameViewController.h"
@implementation iGameViewController
@synthesize player;
int playerheight;
NSMutableArray *location = [NSMutableArray arrayWithCapacity:3];
-(IBAction)up;{
player.center = CGPointMake(player.center.x, player.center.y - 5);
location = [NSMutableArray new];
[location addObject:player.center.x];
[location addObject:player.center.y];
[location addObject:playerheight];
}