Objective-C Help - Ignacio Cabero Can't Figure It Out

  • Thread starter Thread starter ignaciocabero
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around troubleshooting issues in Objective-C code, specifically related to syntax errors and compiler messages. Participants are seeking assistance with understanding and resolving these coding problems.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • Ignacio Cabero expresses frustration in resolving a coding issue and requests help.
  • One participant notes a potential syntax error in the code snippet involving brackets, suggesting that every "[" should have a matching "]".
  • Ignacio acknowledges that the advice helped with one issue but indicates there are still three other problems to address.
  • Another participant provides hints about error handling, mentioning that fixing the first error might resolve subsequent ones and that errors may be caused by issues in preceding lines.
  • Ignacio reports that attempts to follow the advice regarding parentheses did not resolve the issue.

Areas of Agreement / Disagreement

Participants do not appear to reach a consensus, as there are ongoing issues and multiple perspectives on the nature of the errors in the code.

Contextual Notes

There are indications of missing assumptions regarding the specific errors and the context of the code being discussed. The discussion reflects uncertainty about the correct syntax and the compiler's feedback.

Who May Find This Useful

Individuals learning Objective-C, those troubleshooting similar coding issues, or participants interested in syntax error resolution in programming.

ignaciocabero
Messages
10
Reaction score
0
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.
 
Technology news on Phys.org
I've never used Objective-C, but even I can see there's something wrong with
Code:
         [[hero addChild:rightEye];
I'm pretty sure every "[" needs to be matched by a "]".
 
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
 
Welp, I actually fixed that problem by adding some brackets, but now this shows up.
ImageUploadedByPhysics Forums1408140714.136093.jpg
 
ignaciocabero said:
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

ignaciocabero said:
Welp, I actually fixed that problem by adding some brackets, but now this shows up. View attachment 72194
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.
 
Thanks, but when I put a '( ' like it tells me to, it doesn't work.
 

Similar threads

Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
50
Views
4K
Replies
8
Views
1K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K