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 trial

iOS Objective-C Basics Practicing with Immersive Examples Immersive Examples Code Challenge

Task 1 no longer passes...

This error appears every time I check my work, regardless of the issue/error I made. When the answer is correct, I can move on, but any errors immediately tell me that task 1 isn't passing (it's not passing because we were asked to change the values...)

3 Answers

bool levelFinished;
int rubies = 0;
int rubyReward = 7;
int rubyMax = 50;

while (rubies < rubyMax) {
 rubies += rubyReward; 
}

levelFinished = TRUE;

worked for me. Can you please paste your code?

Thanks!

Hi Jake- I actually ended up getting the correct answer and passing the code challenge. At one point, however, I didn't read the question right and used:

rubies++

Instead of:

rubies += rubyReward;

The issue I noticed was that instead of telling me there was an issue with my current code, the feedback told me that Task 1 was now broken (which was unchanged). I think this might be more of a bug than an issue on my end.

Awesome, glad you got it working ! For what it is worth, if you didn't include a semi-colon, that could also have potentially caused problems. Anyways, happy coding. :)

Oops... Apparently I forgot to add the semi-colon in my comment. Thanks for the help!