Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialStuart Lohr
163 Pointswhen i click the 'start your adventure" button it just shuts down
same as title
1 Answer
Frank Mascia
1,765 PointsFigured out the Error, In the Story.Java class I never had a pages[0]=new Page..... block of code, mine was beginning at pages[1]=new Page, therefore causing the null reference to pages[0] as it was never even there, hope that helps.
James N
17,864 Pointsthis helped me out as well.. figured it was this but thought I should look it up to make sure... thanks!
Frank Mascia
1,765 PointsFrank Mascia
1,765 PointsSame here, getting a NullPointerException : Attempt to invoke virtual method 'int com.frankmascia.interactivestory.model.Page.getImageId()' on a null object reference