nscoding issue
no matter what i try i can't seem to get this phrase to work:
i get an "incompatible type for argument 1" error
here is my initwithposition method
where i also get an error of "incompatible type of argument 1 of 'setPosition:'" on the self.position line.
Code:
- (id) initWithCoder:(NSCoder *)decoder{
return [self initWithPosition:[decoder decodeCGPointForKey:kPositionKey]
inventory:[decoder decodeObjectForKey:kInventoryKey]];
}i get an "incompatible type for argument 1" error
here is my initwithposition method
Code:
-(id) initWithPosition:(CGPoint *)pos inventory:(NSArray *)inv{
if ((self = [super init])) {
self.inventory = inv;
self.position = pos;
}
return self;
}where i also get an error of "incompatible type of argument 1 of 'setPosition:'" on the self.position line.
-(id)initWithPosition:(CGPoint)pos inventory:(NSArray*)inv
of course it would be that easy. lol. thank you.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| nscoding a ccsprite | shadowgate15 | 3 | 4,850 |
May 26, 2011 01:36 PM Last Post: Skorche |
|

