ZZxZukaxZZ
Newbie
Karma: 0
Offline
Posts: 6
|
 |
« on: July 20, 2010, 08:54:41 AM » |
|
I like to follow the book and write the code in it, but I always get errors. Whenever i check it with the sources in the book though, it matches. has anybody else had this problem?
|
|
|
|
|
Logged
|
|
|
|
|
J. Harbour
|
 |
« Reply #1 on: July 20, 2010, 09:37:28 AM » |
|
What errors are you getting?
|
|
|
|
|
Logged
|
|
|
|
ZZxZukaxZZ
Newbie
Karma: 0
Offline
Posts: 6
|
 |
« Reply #2 on: July 20, 2010, 07:30:26 PM » |
|
This is for the WalkAbout program in Chapter 11. This has also happened with the programs before, most of them if i can recall, but I figured it would fix itself once i progressed farther in the book.
Error 1 Type 'Direct3D.Sprite' is not defined. C:\Users\Zuka\Documents\Visual Studio 2008\Projects\CH 10\WalkAboutAO\WalkAboutAO\CDirect3D.vb 9 25 WalkAboutAO Error 2 Type 'Direct3D.Sprite' is not defined. C:\Users\Zuka\Documents\Visual Studio 2008\Projects\CH 10\WalkAboutAO\WalkAboutAO\CDirect3D.vb 18 42 WalkAboutAO Error 3 Name 'SpriteFlags' is not declared. C:\Users\Zuka\Documents\Visual Studio 2008\Projects\CH 10\WalkAboutAO\WalkAboutAO\CDirect3D.vb 45 24 WalkAboutAO Error 4 Type 'Direct3D.Sprite' is not defined. C:\Users\Zuka\Documents\Visual Studio 2008\Projects\CH 10\WalkAboutAO\WalkAboutAO\CDirect3D.vb 80 24 WalkAboutAO Error 5 Name 'TextureLoader' is not declared. C:\Users\Zuka\Documents\Visual Studio 2008\Projects\CH 10\WalkAboutAO\WalkAboutAO\CSprite.vb 113 20 WalkAboutAO Error 6 Name 'SurfaceLoader' is not declared. C:\Users\Zuka\Documents\Visual Studio 2008\Projects\CH 10\WalkAboutAO\WalkAboutAO\CTileScroller.vb 128 9 WalkAboutAO Error 7 Overload resolution failed because no accessible 'Filter' accepts this number of arguments. C:\Users\Zuka\Documents\Visual Studio 2008\Projects\CH 10\WalkAboutAO\WalkAboutAO\CTileScroller.vb 128 51 WalkAboutAO Error 8 Name 'UpdateSrollPosition' is not declared. C:\Users\Zuka\Documents\Visual Studio 2008\Projects\CH 10\WalkAboutAO\WalkAboutAO\Form1.vb 86 9 WalkAboutAO
|
|
|
|
|
Logged
|
|
|
|
|
J. Harbour
|
 |
« Reply #3 on: July 20, 2010, 08:00:27 PM » |
|
It looks like some source code files are missing from the project, or DirectX references are missing (that would cause TextureLoader and SurfaceLoader to generate errors).
|
|
|
|
|
Logged
|
|
|
|
ZZxZukaxZZ
Newbie
Karma: 0
Offline
Posts: 6
|
 |
« Reply #4 on: July 20, 2010, 08:48:29 PM » |
|
I tried adding the service reference again, but still no luck
|
|
|
|
|
Logged
|
|
|
|
|
J. Harbour
|
 |
« Reply #5 on: July 21, 2010, 11:13:49 AM » |
|
Are you using 64-bit Windows?
I have compiled the examples with Visual Basic 2008, so I can confirm for you that the sources work with the version you are using. I did not even have to touch the references because they still worked from the original projects created in 2006.
Are you opening the WalkAbout program directly from the book or did you type it in yourself?
|
|
|
|
|
Logged
|
|
|
|
jwright
Newbie
Karma: 0
Offline
Posts: 6
|
 |
« Reply #6 on: July 21, 2010, 11:20:17 AM » |
|
I'm not sure how you are comparing your source code, but that is something I do fairly frequently as part of my job and it is very easy to miss one or two minor things that can cause major problems. I would recommend comparing your code against the source from the cd using a tool such as ExamDiff http://www.prestosoft.com/edp_examdiff.asp. Exam Diff is a freeware tool that has saved me a lot of time in tracking down delta's in source code files and I think you will find it quite helpful.
|
|
|
|
|
Logged
|
|
|
|
ZZxZukaxZZ
Newbie
Karma: 0
Offline
Posts: 6
|
 |
« Reply #7 on: July 21, 2010, 11:26:01 AM » |
|
I am using 32-bit. I write the code, then compare it to the source you provided with the CD. I thought it would work all the same, but is there something I'm missing?
|
|
|
|
|
Logged
|
|
|
|
|
J. Harbour
|
 |
« Reply #8 on: July 21, 2010, 11:38:26 AM » |
|
Can you compile and run the projects off the CD?
|
|
|
|
|
Logged
|
|
|
|
ZZxZukaxZZ
Newbie
Karma: 0
Offline
Posts: 6
|
 |
« Reply #9 on: July 21, 2010, 11:52:35 AM » |
|
Yes, those all work perfectly
|
|
|
|
|
Logged
|
|
|
|
jwright
Newbie
Karma: 0
Offline
Posts: 6
|
 |
« Reply #10 on: July 21, 2010, 12:47:24 PM » |
|
I would recommend that you compare your files (which don't work) with the files from the cd (which do work) using a tool such as ExamDiff as there must be some delta between the files somewhere.
|
|
|
|
|
Logged
|
|
|
|
ZZxZukaxZZ
Newbie
Karma: 0
Offline
Posts: 6
|
 |
« Reply #11 on: July 22, 2010, 05:11:00 PM » |
|
I compared it and changed it but still get the same errors. Do i need to do something different because of my computer?
|
|
|
|
|
Logged
|
|
|
|
jwright
Newbie
Karma: 0
Offline
Posts: 6
|
 |
« Reply #12 on: July 23, 2010, 10:46:22 AM » |
|
Well if the code from the book is compiling fine on your computer, but your code still isn't working that leads me to believe that there is still a problem in your code somewhere. Without seeing the code I cannot think of anything else to suggest you try.
|
|
|
|
|
Logged
|
|
|
|
|
Game Dev Forum
|
|
|
|
|
|
Logged
|
|
|
|
|