I'm trying to learn XNA for the first time. I don't know C#, but I do have a decent understanding of C++, so this isn't completely unfamiliar to me. But I'm trying to take a character I modeled in Maya and put it into a 3d game. Really what I'm trying to do is make the character display on the screen--there isn't an actual game yet. So I'm following a tutorial in Learning XNA 4.0 by Aaron Reed.
I thought I'd followed everything properly, but I'm getting errors like this: (FYI, Science is the name I picked for the game for now)
Error 2 The best overloaded method match for 'Science.ModelManager.ModelManager(Microsoft.Xna.Framework.Game)' has some invalid arguments C:\Users\Dallas Brittany\Documents\Visual Studio 2010\Projects\Science\Science\Science\ModelManager.cs 41 28 Science
Error 3 Argument 1: cannot convert from 'Science.ModelManager' to 'Microsoft.Xna.Framework.Game' C:\Users\Dallas Brittany\Documents\Visual Studio 2010\Projects\Science\Science\Science\ModelManager.cs 41 45 Science
Error 4 The name 'Components' does not exist in the current context C:\Users\Dallas Brittany\Documents\Visual Studio 2010\Projects\Science\Science\Science\ModelManager.cs 42 13 Science
Error 5 The name 'gameTime' does not exist in the current context C:\Users\Dallas Brittany\Documents\Visual Studio 2010\Projects\Science\Science\Science\ModelManager.cs 71 23 Science
The errors are all in ModelManager.cs, but who knows--maybe I left out something earlier in the tutorial even though it didn't display an error.
I've attached all the files in a .zip. [attachment=12058:Science.zip] But I also attached a .png of what I think is the problem area in the code.
Thanks
XNA: adding 3d model to game
You have to add the model manager in the main Game.cs file. You can't add the model manager as a Component of itself you have to add it to the Game.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement