Hey everybody.
I got a neat book on XNA over the holidays and have started work on what seems to be a simple tutorial. In the book it tells you to create a folder for textures and upload a spritesheet and a titlescreen bit map. Everything is in the folder but when I try to compile I get an error saying the files cannot be opened.
titleScreen = Content.Load<Texture2D>(@"\Textures\TitleScreen.png");
spriteSheet = Content.Load<Texture2D>(@"\Textures\SpriteSheet.png");
Error loading "\Textures\TitleScreen.png". Cannot open file.
Error loading "\Textures\spriteSheet.png". Cannot open file.
Could anybody help?
Did you link the pictures in the content manager?
[QUOTE=Phreebird;34078827]Did you link the pictures in the content manager?[/QUOTE]
Im not sure. I feel like a noob for saying this but...
How do you do that?
This tutorial goes into detail.
[url]http://rbwhitaker.wikidot.com/managing-content[/url]
[QUOTE=Phreebird;34078893]This tutorial goes into detail.
[url]http://rbwhitaker.wikidot.com/managing-content[/url][/QUOTE]
That's already done my friend.
I not get something about an unrecognised escape sequence?
[code]
titleScreen = Content.Load<Texture2D>("Textures\TitleScreen");
spriteSheet = Content.Load<Texture2D>("Textures\SpriteSheet");
[/code]
Don't have the file format at last, and make sure that you have your textures inside
"(Content)/Textures/ "
[QUOTE=RebelSlug;34078963][code]
titleScreen = Content.Load<Texture2D>("Textures\TitleScreen");
spriteSheet = Content.Load<Texture2D>("Textures\SpriteSheet");
[/code]
Don't have the file format at last, and make sure that you have your textures inside
"(Content)/Textures/ "[/QUOTE]
I have. Everything is set up properly. Still getting the error.
Fixed.
So what was the problem?
[QUOTE=RebelSlug;34079087]So what was the problem?[/QUOTE]
It was just the way I loaded the content :3 It was stupid.
Sorry, you need to Log In to post a reply to this thread.