tags:

views:

48

answers:

1

I have this call: (Velocity is a CGPoint)

float velY = Velocity.y;
velY = [self DoJump:velY :gT];

To this:

- (float) DoJump:(float) velocityY:(ccTime) GameTime
{

   return velocityY;
}

but im getting an error at the call saying incompatible types. Can someone tell me what is wrong?

A: 

I don't know what you pass to the function, but your definition looks wrong. It should be more like:

- (float) DoJump:(float)velocityY andTime:(ccTime) GameTime

and then you call it with

velY = [self DoJump:velY andTime:gT];

Make sure to pass float and ccTime types to the method.

Felix Kling
And make sure the method declaration is known prior to using it, i.e. place it in your .h file.
Eiko