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 Scope and Loops Review Scope and Loops

Garth Hill
Garth Hill
596 Points

Syntax Error

I have no idea what I'm doing wrong, but I keep getting an error when I check my work. I think my logic is correct (although I also think there may be a more straightforward way of solving this problem). Maybe it's a syntax error?

Any help would be greatly appreciated.

int mathTotal;
BOOL isComplete;

for (int i=5, i < 25, i++) {

if (mathTotal == 25) {
  isComplete = TRUE;

else {
  isComplete = FALSE;

1 Answer


I can't seem to determine the exact problem with the information you have given. What exactly is the compiler telling you?

Thank you, Landon