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
James Fredrick
1,756 PointsExpected Expression error in XCode for IOS
Thanks for all your help previously! I have finally created a functioning Open GL game. Only problem is that there is an error in the most basic part of the UI. The IBAction. Here is a screenshot of XCode at the time of the error (yes I finally can put in images!)
The code
-(IBAction)returnpress
{
cruzia.hidden = 0;
textarea.hidden = 0;
playbtn.hidden = 0;
tutorialbtn.hidden = 0;
optionsbtn.hidden = 0;
trainingbtn.hidden = 0;
back.hidden = 1;
soundlbl.hidden = 1;
music.hidden = 1;
sound.hidden = 1;
musiclbl.hidden = 1;
cruzia.text = @"Cruzia";
textarea.text = @"";
if (clicked == 1) {
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef soundFileURLRef;
soundFileURLRef =CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"click", CFSTR ("electronic click.wav"), NULL);
UInt32 soundID;
AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
AudioServicesPlaySystemSound(soundID);
}
}
Is always bringing up the error: expected expression If anyone can tell me how to rid myself of this error, I would be very appreciative.
-George
James Fredrick
1,756 PointsOK sorry!
1 Answer
James Fredrick
1,756 PointsHere is the answer, I just figured it out:
I forgot to close the previous curly brace and this ended in tragedy!
Sorry to waste all your time!

James Barnett
39,199 PointsJames Barnett
39,199 PointsYou seem to be going a bit overboard with the tags on your post. Generally a post only needs a 1 or 2 tags. The primary purpose of tags is for helping future forum searchers find posts with similar content.
There's a great bit on tags over on this site's FAQ http://pineapple.io/faq check out the section labels a word about tags to read more about the philosophy behind making good tags.