Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Objective-C app programming problem

  1. Aug 18, 2014 #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.
     
  2. jcsd
  3. Aug 18, 2014 #2

    jedishrfu

    Staff: Mentor

    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.
     
  4. Aug 20, 2014 #3
    Thanks for the help but nothing worked :(
     
  5. Aug 21, 2014 #4

    Mark44

    Staff: Mentor

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Objective-C app programming problem
Loading...