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

Liam Brady
Liam Brady
9,713 Points

Ribbit App - Stage 5 - Code Challenge 1

So, I feel like I must be missing something rather obvious here, but I can't quite figure out what. This is the error I'm receiving:

"Compilation Error! Check your syntax! Are you using the method as specified in the instructions? Did you forget something, like a semicolon?"

This is my code:

- (void)viewDidLoad {
    [super viewDidLoad];

    PFQuery *query = [PFQuery queryWithClassName:@"Move"];

    // Insert code here!

    [query getObjectInBackgroundWithId:@"1" block:^(nil) {

    }];
}

2 Answers

Stone Preston
Stone Preston
42,016 Points

your nil syntax is not correct. you just need to pass in nil, not ^(nil)

PFQuery *query = [PFQuery queryWithClassName:@"Move"];

// Insert code here!
[query getObjectInBackgroundWithId:@"1" block:nil];
Liam Brady
Liam Brady
9,713 Points

Ah...thank you!

I'll sleep easier tonight now.