Game Development Community

Chapter 3 heart.dts directory difficulty

by Matt Van Gorkom · in Torque Game Engine · 12/24/2004 (2:34 pm) · 7 replies

I'm having trouble with chp 3 on the moveshape.cs script. When I run moveshape.cs from the consol it succeeds in compiling and loading the script, but then I get the error:

ch3/moveshape.cs (0): preload failed for TestShape: ShapeBaseData: Couldn't load shape "~data/shapes/items/heart.dts"


I can't find any typos in my code, but I am using a Mac. Are directories accessed differently on a Mac? Any help would be appreciated. Thanks.

#1
12/24/2004 (3:35 pm)
Um... Did you go to the directory "~data/shapes/items/heart.dts" and make sure that the file is there? I would assume that it isn't and that would be the problem...

Max
#2
12/25/2004 (12:42 pm)
Yes, it is indeed there. That was the first thing I checked :P
#3
12/25/2004 (4:14 pm)
Can you post the little bit of code you are using please?

Max
#4
12/25/2004 (5:02 pm)
I realized I ought to have posted the code right-off-the-bat. Here it is:


datablock ItemData(TestShape)
// Definition of the shape object
{
// basic item properties
shapeFile = "'~/data/shapes/items/heart.dts";
mass = 1; // give shape mass
friction = 1; // friction stops item from sliding

};


I used echo to see how far the program got and it doesn't get past this datablock which is the first bit of code, without causing the error. I dunno if that helps or not.
#5
12/27/2004 (4:35 pm)
I don't see anything wrong...

You can try this

category = "TestShapes";

and just throw that in there to see if it works...

Does the heart show up in show tool?

Max
#6
12/28/2004 (2:43 pm)
It didn't work but what does:

category = "TestShapes";

do?

The Show tool can see the model, so the model isn't messed up. This is a pain. I can't proceed until I get this figured out...

How do you specify which directory you want the show tool open? Right now I have to take the model and drop it into the show folder. This doesn't seem correct.
#7
12/28/2004 (3:09 pm)
DRAT!!! Why is debugging so stinkin' annoying?!!!!!!

I figured out the reason heart.dts wasn't loading: apparently when I made the ~ symbol I accidently hit it the first time without so it made a ' instead of a ~. So I had "' instead of " at the beginning of my path string. Now I feel stupid, but I may continue on in my quest to learn TGE! :)

Thanks for all your help Max