Objective-C app programming problem

  • #1
So i'm currently developing a simple iOS Application, written in Objective-C, and I recently came across this problem.
ImageUploadedByPhysics Forums1408389074.010883.jpg
the first problem says "Expected identifier or '( '"
The second problem says "Missing '@end'" even though '@end' is clearly there. Any help would be great.
 

Answers and Replies

  • #2
13,324
7,241
Are you missing a closing square bracket after the string and before the semicolon?

The next line is also missing a closing square bracket too.
 
  • #3
Thanks for the help but nothing worked :(
 
  • #4
35,644
7,519
Please do us a favor and post your code as text rather than as a screen shot. With a screen shot we can't see anything beyond what you have copied, so we don't get what might be important context. For example, the line that says [hero.addChild : rightEye;] has a right brace just below it, but we can't see the opening brace.

As jedishrfu already noted, there are missing square brackets in the first line that shows an error as well as the line following it. Several of your other posts have exhibited the same problem.

The line of code that starts with ICHeroClass.name = [@"hero"; looks to me like it should be part of the definition of some function, but is not part of any function that I can see. That is a problem. Another clue is the line that says return hero.

My advice to you would be to put your project on hold for a while and invest some time in the basics of Objective-C. Until you get comfortable with the basic ideas such as how to write the header and definition of a function (and the purpose for the square brackets), you will be beating your head against a brick wall trying to get your code to work.
 

Related Threads on Objective-C app programming problem

  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
8
Views
7K
  • Last Post
Replies
9
Views
3K
Replies
3
Views
2K
  • Last Post
Replies
4
Views
1K
Replies
14
Views
2K
Replies
14
Views
958
  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
5
Views
977
Top