EDIT: I fail... forgot the asterisks behind cpSpace, help is no longer needed.
In my main file I am creating a space, then initializing another file using that space using this method:
- (id)initWithSpace:(cpSpace)space position:(cpVect)position;
I setup my space with the following:
- (void)createSpace
{
cpInitChipmunk();
space = cpSpaceNew();
space->gravity = ccp(0, -100);
cpSpaceResizeStaticHash(space, 400, 200);
cpSpaceResizeActiveHash(space, 200, 200);
}
From there I go to initialize my other file with the code:
OtherFile *file = [[[OtherFile alloc] initWithSpace:space position:pos];
[self addChild:file];
On compile I get some errors which simply don't make any sense, if anyone has any ideas, assistance would be greatly appreciated.
Sending 'cpSpace *' (aka 'struct cpSpace *') to parameter of incompatible type 'cpSpace *' (aka 'struct cpSpace *')
Confused by earlier errors, bailing out