Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am converting this monkey jump game tutorial in android. I have done til monkey sliding right to left and left to right but I am stuck in the part of monkey walking animation. I have tried but getting the "Null Pointer Exception"

This is my code

CCSpriteFrame frame = CCSpriteFrameCache.spriteFrameByName("left_1.png");
walkAnimation.addFrame(frame);
CCSpriteFrame frame2 = CCSpriteFrameCache.spriteFrameByName("left_2.png");
walkAnimation.addFrame(frame2);
monkey.addAnimation(walkAnimation);
CCAnimate  wAction = CCAnimate.action(walkAnimation,true);
monkey.runAction(wAction);
share|improve this question

closed as too localized by Ricket Oct 7 '12 at 16:29

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Where are you getting the Null exception? probably you didn't start walkAnimation, check your code. –  Gustavo Maciel May 7 '12 at 5:33
    
i have start the walkAnimation is the object of CCAnimation. –  jubin May 7 '12 at 6:19
3  
This is pretty basic debugging. Without a line number or more context we are just guessing anyway. –  Tetrad May 7 '12 at 6:31

1 Answer 1

You should learn how to read the stack trace. I suggest you read this.

share|improve this answer
    
This is a comment. While useful, it's not an answer to the question. –  Byte56 Oct 7 '12 at 7:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.