Please help me in removing the error with explanation
Error on the following line:
_Sprite.position.x = _Body->GetPosition().x * _PhysicsWorld->RATIO;
Error message: Invalid operands to binary expression (‘float32 (aka ‘float’) and ‘float32()())
_Body is a B2Body object
_Sprite is a CCSprite object
_PhysicsWorld->RATIO returns float32
If I change the line to:
_Sprite.position.x = _Body->GetPosition().x * (float) _PhysicsWorld->RATIO;
Another error message comes: C-style cast from float32(*)() to float is not allowed.
You probably need to do:
Note the trailing ‘()’ after RATIO.
You are multiplying a float (which parses into pointer dereferencing instead) by a function that returns a float (I believe).