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 trialAled Evans
3,163 PointsError with INSERT
I seem to be getting the following error error: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0). when trying to add
todo.insert("Watch TV", at: 1)
Any advice would be much appreciated.
Aled Evans
3,163 PointsThanks for your reply. Restarting xcode removed the error.
Paolo Scamardella
24,828 PointsPaolo Scamardella
24,828 PointsYou need to post some additional code in order for others to help you. At this point, I cannot tell what type is todo. I'm guessing it is an array of strings, but I suspect that todo is nil.