473,396 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

expected ';' before '{' token please help ?

hi

im trying to make an simple app and i where almost done

but then this error apear and i just cant figure out how to fix it !

Please help me im desperate?



the error says: expected ';' before '{' token

Expand|Select|Wrap|Line Numbers
  1. -(IBAction)playsound {
  2.  
  3.  
  4.     NSString *path = [[NSBundle mainBundle] pathForResource:@"ljudeffectha" ofType:@"wav"];
  5.  
  6.     AVAudioPlayer* myAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
  7.  
  8.     myAudio.delegate = self;
  9.  
  10.     myAudio.volume = 2.0;
  11.  
  12.     myAudio.numberOfLoops = 1;
  13.  
  14.     [myAudio play]; 
  15.  
  16.  
  17.  
  18.  
  19. @end
  20.  
Attached Images
File Type: jpg Skärmavbild 2011-11-13 kl. 14.39.13.jpg (34.2 KB, 162 views)
Nov 13 '11 #1

✓ answered by weaknessforcats

The compiler knew it was in trouble when it got to the {.

That means your error is before the {. Maybe it's before the code you posted. Like maybe you forgot a } before you coded the { that you posted.

9 2459
this is my last hope please help mee ?
Nov 13 '11 #2
weaknessforcats
9,208 Expert Mod 8TB
What language is this?
Nov 13 '11 #3
i am using objective-c++ in xcode
Nov 13 '11 #4
weaknessforcats
9,208 Expert Mod 8TB
I can't help you, then. I am only familiar with ANSI C++ and various extensions thereunto. Sorry.
Nov 14 '11 #5
Rabbit
12,516 Expert Mod 8TB
You didn't close your function.
Nov 14 '11 #6
but its the same problem even when i close it ?
Nov 14 '11 #7
if it helps. the program says that it is the first line that is strugling.
Nov 14 '11 #8
weaknessforcats
9,208 Expert Mod 8TB
The compiler knew it was in trouble when it got to the {.

That means your error is before the {. Maybe it's before the code you posted. Like maybe you forgot a } before you coded the { that you posted.
Nov 14 '11 #9
thanks alot man :)

I APPRECIATE it :)
Nov 14 '11 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: learning_C++ | last post by:
Hi, I try to use input = new istrstream(argv,strlen(argv)); in my code, but it always says error: " error: parse error before `(' token" please help me! Thanks, #include <map>
1
by: Brian Cobb | last post by:
Greetings; I have an application where I am receiving HTML fragments containing snippets (sub-fragments?) of XML. I wish to extract the XML bits for further processing. In the process of...
2
by: SaCompGeek | last post by:
I have a class that defines a Key/Name value collection that i generated by and XML Element with multiple attributes. The attribute are used to create the collection of 'Binate' objects. This is...
0
by: Franck | last post by:
Hello, here is my basic dtd <!ELEMENT TREENODES (treenode*)> <!ELEMENT treenode (treenode*)> <!ATTLIST treenode Text (#PCDATA) #REQUIRED Level (#PCDATA) #REQUIRED NodeData (#PCDATA) ...
4
by: lisa | last post by:
I have an XML file that starts like this: <?xml version="1.0" encoding="ISO-8859-1" xmlns:fn="http://www.w3.org/2005/xpath-functions"?> <Authors> <Author> <ID>2</ID>...
1
by: Ben Walling | last post by:
I'm getting the following error on one of 110 machines that is using a webservice to upload database changes to a central location: System.Web.Services Server was unable to read request. --There...
2
by: k1ckthem1dget | last post by:
I need to display the unsorted list of names and display the sorted list of names. My program is getting a bunch of errors though, and i dont know why. I am getting the following errors. 28:...
6
by: juvin | last post by:
hi, I am going mad........because of this error..... I have done a simple coding........i am getting this error.... solution may be very simple,,,but i dont know..........can any body help...
2
by: =?Utf-8?B?Y2FzaGRlc2ttYWM=?= | last post by:
Hi, has anyone come across this error before: This is an unexpected token. The expected token is 'NAME' I am getting it when trying to send an xml file across a web service layer. The...
0
by: kirthi kumari | last post by:
i donot find any errors,but for almost 18lines of the code am getting an error saying "class,interface or enum expected error".please look at the code below package NQ; import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.