Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Building a Game Engine with Cocoa, Part 2
Subject:   FIXED: Incorrect Boolean login in NOTEQUAL_NSPOINTS?
Date:   2007-01-12 17:09:37
From:   ptwobrussell
Response to: FIXED: Incorrect Boolean login in NOTEQUAL_NSPOINTS?

It appears that the zip file that contains the project has gotten corrupted. I got an error from StuffIt as well as a CRC error from "unzip" when I downloaded it, so I believe this is your problem. I've notified the folks that produce the articles and they're working to get it updated.


If you want to work on this in the meantime, you should be able to take the .h and .m files given at the beginning of the article and import them into a new Xcode project, connect the outlet that's mentioned and be good to go.


I'll check back in and notify everyone once the zip archive is updated on O'Reilly's server.

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Matthew Russell photo FIXED: Incorrect Boolean login in NOTEQUAL_NSPOINTS?
    2007-01-15 11:23:07  Matthew Russell | O'Reilly AuthorO'Reilly Blogger [View]

    The project files are now downloadable in a non-corrupted format. Sorry about that. We're not quite sure how it happened, but it's fixed now.

    As for the errors mentioned about the arrays having incomplete element types, Ginkgo_52 is absolutely correct. I've been building with GCC 3.3, so I didn't notice those problems. The fix mentioned does indeed work. The only caveat I'd add is to use DIMENSION instead of hard coding 8 in those places where you have arrays defined as int[][].

    Anyhow, just for informational purposes, you can also go into terminal and type "sudo gcc_select 3.3" (or whatever version you want) if you want to explicitly change the default version of gcc used.

    I'll make these changes to the final project file for next time. Thanks again, Ginkgo_52, for the quick assist...I had initially thought that the corrupted project files might have somehow been the issue.
  • FIXED: Incorrect Boolean login in NOTEQUAL_NSPOINTS?
    2007-01-15 09:55:49  Ginkgo_52 [View]

    I also receive the "array type has incomplete element type" errors when building using the GCC 4.0 compiler, but not with GCC 3.3 (the project compiles with no errors using GCC 3.3). This appears to be due to changes that were made in the GCC compiler in version 4 - the GCC compiler no longer allows incomplete (undimensioned) array types. A quick web search indicates that others have obtained this error in GCC 4.0 from code that compiled with GCC 3.x.

    The project will compile without errors in GCC 4.0 if the board array is explicitly dimensioned by changing the four occurrences of 'withBoard:(int[][])board' to 'withBoard:(int[8][8])board' (one each in GameBoard.h, GameBoard.m, AppController.h and AppController.m).