I have the following code!
@ CCSprite *bottle = CCSprite::create(“bottle.png”);
bottle:setPosition(ccp(origin.x + visibleSize.width/2,
origin.y + visibleSize.height - bottle->getContentSize().height));
bottle:setAnchorPoint(ccp(0.5f,0.5f));
bottle:setRotation(45);@
This code(the last line to be precise) throws the error
Redifinition of label ‘bottle’
What does this error mean? What am I doing wrong here?
The error message is giving you a clue. You probably defined “bottle” multiple times . Probably first as label and the here as sprite
Please use the search option to find out how many times you defined it.
Jobed Rony wrote:
The error message is giving you a clue. You probably defined “bottle” multiple times . Probably first as label and the here as sprite
Please use the search option to find out how many times you defined it.
Yeah thats what I thought initially… but I do not have bottle declared in any other place.
Also, if I comment out the bottle:setAnchorPoint(ccp(0.5f,0.5f));
then there is no error. and the code builds successfully…
really weird. any ideas?