0

I started to develop this game for Window 8 but I wrote error's code already for Windows 10(I don't know if this information is useful so I put it). When I debug I see the "ContentLoadException" window. This is the object initialization code:

            //initializes the platform (this object's content is loading fine)
            platform.Initialize(Content.Load<Texture2D>("Graphics\\platformTexture"), new Vector2(GraphicsDevice.Viewport.TitleSafeArea.X + GraphicsDevice.Viewport.TitleSafeArea.Width / 2, GraphicsDevice.Viewport.TitleSafeArea.Y + GraphicsDevice.Viewport.TitleSafeArea.Height));
            //Second initializtion is to use the texture's Height and Width to set position
            platform.Initialize(platform.texture, new Vector2(platform.Position.X, platform.Position.Y - platform.texture.Height - 60));

            //initializes the ball (this object's content is loading fine)
            ball.Initialize(Content.Load<Texture2D>("Graphics\\classicBall"), new Vector2(platform.Position.X, platform.Position.Y), GraphicsDevice, -1);
            //Second initializtion is to use the texture's Height and Width to set position
            ball.Initialize(ball.texture, new Vector2(ball.Position.X, platform.Position.Y - (float)ball.bounds), GraphicsDevice, -1);

            //initializes the brick (this object's content is getting error)
            testBrick.Initialize(Content.Load<Texture2D>("Graphics\\classicYellowBrick"), GraphicsDevice.Viewport.TitleSafeArea.Center.ToVector2(), ball);

And this is my Content.mgcb code

#begin Graphics/platformTexture.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Graphics/platformTexture.png

#begin Graphics/classicBall.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Graphics/classicBall.png

#begin Graphics/classicYellowBrick.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Graphics/classicYellowBrick.png

I've already checked if it was a write error at location string and if it was well referenced at the content file. I've already searched the fóruns for a answer. But I didn't find one, so I need help.

Thank you for your attention. I hope this is enough for you to provide me an answer.

Farael
  • 1
  • 1

0 Answers0