Weird EXC Access on start

Weird EXC Access on start
0.0 0

#1

i’m getting a EXC bad access on the 2nd line of this code
the declaration of mainP is under the use namespace

mainP = CCSprite::spriteWithFile(“penguin_back.png”, CCRectMake(0, 0, 65.5, 83.5));
mainP~~>setPosition);
this~~>addChild(mainP);

Helpppp!

s. i’m a n00b


#2

Mabe mainP is null. You should check it.


#3

I’ll just use a different approach, but thanks anyway!:slight_smile: