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

Whats wrong with this? out dated? it was in a video

PASTE = question from above http://scr.hu/2icp/ugiz0

actualy , this breaks my code http://scr.hu/2icp/dp03f

Have you tried clicking on the little yellow warning sign within left margin? Usually it will offer a correction to the problem.

yes, it has nothing to do with it , even if i outcoment that yellow triangle or delete the code. it still breaks

1 Answer

You need to make the int unsigned. And it's best practice to use nil instead of NULL in Objective-C. You can send messages to nil, but you can't send messages to NULL.

srandom((unsigned)time(nil));

Also, the second link you posted is just showing the top level of where your code is breaking... you need to use exception breakpoints to see where in your code it's actually stopping. It would probably do you some good to watch/review debugging basics. You can see in this video. http://teamtreehouse.com/library/build-a-simple-iphone-app-ios7-2/testing-and-debugging/debugging-basics-2