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 help

  1. Aug 15, 2014 #1
    I've tried to figure out the problem all night, but I can't figure it out. ImageUploadedByPhysics Forums1408135774.004256.jpg Sorry if it's hard to see.
    Thank you so much,
    Ignacio Cabero.
     
  2. jcsd
  3. Aug 15, 2014 #2

    DrGreg

    User Avatar
    Science Advisor
    Gold Member

    I've never used Objective-C, but even I can see there's something wrong with
    Code (Text):

             [[hero addChild:rightEye];
     
    I'm pretty sure every "[" needs to be matched by a "]".
     
  4. Aug 15, 2014 #3
    Thanks so much, that helped for the hero addChild, but there is still the three other ones that I need help with (the ones under the hero addChild
     
  5. Aug 15, 2014 #4
    Welp, I actually fixed that problem by adding some brackets, but now this shows up. ImageUploadedByPhysics Forums1408140714.136093.jpg
     
  6. Aug 15, 2014 #5

    DrGreg

    User Avatar
    Science Advisor
    Gold Member

    Some hints about errors.

    1. When one error occurs, often the following lines don't make sense to the compiler; fixing the first error may make the other errors go away.
    2. Sometimes the error isn't on the line identified by the compiler, but on the line before (e.g. something is missing from the line before, so the compiler can't make sense of the current line).
    That second hint applies to the error you have now.
     
  7. Aug 15, 2014 #6
    Thanks, but when I put a '( ' like it tells me to, it doesn't work.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Objective-C help
Loading...