Objective-C app programming problem

  • Thread starter Thread starter ignaciocabero
  • Start date Start date
  • Tags Tags
    App Programming
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
ignaciocabero
Messages
10
Reaction score
0
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.
 
Physics news on Phys.org
Thanks for the help but nothing worked :(
 
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.