   Extreme problems with the book code in Jim Adam's book.
  Every time I type into MSVC++.NET the code I see in his book (Programming Role Playing Games w/ DirectX) I get a vast number or compile errors. And it is not because of misspelling, not including header files, not linking to lib files, or other common mistakes.An example would be when I copied verbatim the "framework" code and tried to compile it--I got 44 build errors! However when I took the WinMain.cpp file off the CD it worked perfectly. I also noticed many changes in the setup. For instance, in the book he had a function ''DoPreFrame()'' but on the CD he just has ''DoInit()'', ''DoFrame()'', and ''DoShutdown()'' with no ''RegisterWindowClasses()'' or ''UnregisterWindowClasses()'' functions.Has anyone had this problem and if so how did you get around it or fix it for that matter?   "Do not flame people you don''t know in a public forum. Only amateurs do that. Professionals in the industry know they will run into each other over and over. The person you flame this year may the person you want to do business with next year. Don''t burn your bridges," (Diana Gruber, http://www.makegames.com/chapt6.html). 
  Are any of the errors anything to do with ''IDirect3D8 *D3DObject'' or the like? If you''re using newer SDKs (DirectX 8.1 is what I use), it is possible that the compiler will require you to use ''LPDIRECT3D8 D3DObject'' instead of ''IDirect3D8 *D3DObject''. I don''t know if this helps, but... ;  If you''re typing the same code and it''s the cpp file that is making the difference, just retype the code or skim both side by side to see mistake made.If it''s a special setting, then just start from scratch by creating a new win32 app.  A lot of demos i''ve downloaded only work when I make a new project and either type files myself or insert them.Good luck ;quote:Original post by Toonkides   Good luck   Oluseyi check it out.>>>>>>>>>>>>>>>>>>Thanks Toonkides "Do not flame people you don't know in a public forum. Only amateurs do that. Professionals in the industry know they will run into each other over and over. The person you flame this year may the person you want to do business with next year. Don't burn your bridges," (Diana Gruber, http://www.makegames.com/chapt6.html)  .   [edited by - DIRECTXMEN on February 4, 2004 10:36:05 PM];quote:Original post by fyhuang  Are any of the errors anything to do with ''IDirect3D8 *D3DObject'' or the like? If you''re using newer SDKs (DirectX 8.1 is what I use), it is possible that the compiler will require you to use ''LPDIRECT3D8 D3DObject'' instead of ''IDirect3D8 *D3DObject''. I don''t know if this helps, but...   I think this is the major problem with the book code. I use 8.1 as well and on his website he makes the adjustments to his code needed due to newer versions of DirectX coming out.As a side note, since DirectX 9 has been out now for a while so why don''t the authors or publishers give a recent version on the CD and update the book itself. For instance I just bought Specials Effects Programming with DirectX and the CD/Book uses 8.1. Oh well, I guess I actually have to read the SDK.Thanks.  "Do not flame people you don''t know in a public forum. Only amateurs do that. Professionals in the industry know they will run into each other over and over. The person you flame this year may the person you want to do business with next year. Don''t burn your bridges," (Diana Gruber, http://www.makegames.com/chapt6.html). ;  Well for one thing, our current book-making methods are store based, where there are huge warehouses full of books and such that are shipped to stores. When you update the books all of these books in the warehouses are out of date. That's a lot of money down the tubes. They'd rather just leave it in there and put an update on their website so that you can get the fixes. It's not like an online article or a online tutorial where you can go back and tweak it, or a message on these boards where you can edit the message without anyone asking what you're doing. (Like I am now, or should I say 'Like I just did'?  )Updating a book for a new SDK also takes a lot of work and doesn't get done fast. This is why universities don't have good comp-sci departments (they're working on that though), computers update so fast that the professor has to create a new curriculum every semester, wheras a history professor has to update their curriculum once a decade if they're lucky (and if they're unlucky it's just a minor update every couple years).If we switch over to "on-demand publishing" like that HP ad (I think it was HP), then the updates might occur more often.And yes, I would highly recommand actually reading the SDK. It's not that difficult. Sure some parts make you go "what the ... are they talking about?" but that's what Google is for, and for the most part it's fairly easy to figure out. Now the example code, THERE'S a challenge.   [edited by - Erzengeldeslichtes on February 5, 2004 3:04:43 AM];  Well tuff shit on the publishers. They shouldn''t print so many books! And if you buy a book it should be up to date OR state clearly that is for version X on the cover. Also they should speed up the process of updating books because it IS a problem, and lastly no the SDK isn''t that easy to read it''s a bloody mess, which is why web site like this do so bloody well!Ahhh, that''s better. ;quote:Original post by Anonymous Poster  ...OR state clearly that is for version X on the cover.The title of the book is "Programming Role Playing Games with DirectX 8.0" How much clearer would you like it?;  actually the version number isn't on the cover http://www.gamedev.net/columns/books/bookdetails.asp?productid=172 ...but nice attempt at being a smart ass.   [edited by - dmengelt on February 5, 2004 2:34:29 PM];quote:Original post by DMengelt  actually the version number isn''t on the cover http://www.gamedev.net/columns/books/bookdetails.asp?productid=172 ...but nice attempt at being a smart ass.Actually, it is on the cover.