Can't Add Material In T2D without breaking XML
by Matthew Hoesterey · in Torque X 2D · 09/15/2008 (9:22 pm) · 7 replies
Heya, I've scene this problem before and I've never found a solution other then recreating all my .txscene files. This always happens to me as I work on a project for a while and have no clue why. I already have materials added to TXB and it seams that randomly the project will "currupt" and adding any mats breaks my XML.
My game runs and compiles fine. However whenever I add a new material to Torque X Builder, save, and rebuild I get the following error:
SceneLoader.Load -Error loading XML file 'data\levels\levelData.txscene ContentLoadException: 'Error loading "data\images\elevator_bottom"
I looked through the leveldata.txscene and found the image
data/images/elevator_bottom.png
true
I also found this code in the game.txproj
FULL
false
true
true
false
1
translucent
1
data/images/elevator_bottom.png
that is the proper path. I'm not sure whats going on or where to look in order to fix this. Thanks for any help.
I should also point out that deleting the materials I added and re saving will allow me to rebuild and run the game again.
My game runs and compiles fine. However whenever I add a new material to Torque X Builder, save, and rebuild I get the following error:
SceneLoader.Load -Error loading XML file 'data\levels\levelData.txscene ContentLoadException: 'Error loading "data\images\elevator_bottom"
I looked through the leveldata.txscene and found the image
I also found this code in the game.txproj
that is the proper path. I'm not sure whats going on or where to look in order to fix this. Thanks for any help.
I should also point out that deleting the materials I added and re saving will allow me to rebuild and run the game again.
#2
There may be a bug where TXB isn't sending out the signal to add the image. No big deal now that I figured it out though. :)
09/17/2008 (5:47 pm)
I finally figured this one out. So The error above lead me to believe it was an XML Error. Turns out XNA studio didn't get the update from the TXB and as TXB already updated the xml file it didn't think it needed to send out an update. I just needed to manually add the file into the solution explorer of the xna StudioThere may be a bug where TXB isn't sending out the signal to add the image. No big deal now that I figured it out though. :)
#3
I am using Torque X 2D platformerdemo .and I tried to import my own new images. But I am getting this error.
SceneLoader.Load – Error loading XML file : ‘data\levels\jin_level_2.txscene’, ContentloadException: ‘Error loading “data\images\test_image”. File not found.’
But when I use starter 2d template, I don’t get any errors with my new images.
I don’t know programming at all. I just wanted to swap images with mine.
Can you help me?
Thank you for reading this
06/29/2009 (10:49 am)
Can you please explain little bit detail how you did for this problem?I am using Torque X 2D platformerdemo .and I tried to import my own new images. But I am getting this error.
SceneLoader.Load – Error loading XML file : ‘data\levels\jin_level_2.txscene’, ContentloadException: ‘Error loading “data\images\test_image”. File not found.’
But when I use starter 2d template, I don’t get any errors with my new images.
I don’t know programming at all. I just wanted to swap images with mine.
Can you help me?
Thank you for reading this
#4
Whats happening is your xml is loading the image but your code dosn't have a refrence pointing to it's location.
I had this problem when I was learning to code as well. :)
06/29/2009 (11:51 am)
You need to open up visual studio and in the sollution explorer just right click on the images folder and click add existing. Then navigate to your image.Whats happening is your xml is loading the image but your code dosn't have a refrence pointing to it's location.
I had this problem when I was learning to code as well. :)
#5
e: Looks like you beat me.
06/29/2009 (11:52 am)
In Visual Studio, you have to open up your Content (data) node inside your Solution Explorer, right click on the images folder, and choose Add -> Existing Item... Then, navigate to where test_image is and click OK to add it to your solution. Build your solution and you shouldn't have the error anymore.e: Looks like you beat me.
#6
06/29/2009 (5:57 pm)
Heh, photo-finish on the response...and it's Matthew by a nose.
#7
06/29/2009 (9:12 pm)
Thank you so much. you guys are so kind.
Torque Owner Matthew Hoesterey
This is the first serious project I am starting with torque. Before now I was just experimenting and learning so if this happened I would just recreate the scene file from scratch.
Now that I'm working on an actual game that will quickly become an impossibility. Does anyone know what is causing this? It has happened on multiple computers so I don't belive it has anything to do with my system.