Game Development Community

%obj.save(%filename); <<-- How does this work?

by Bill Henderson · in Torque Game Engine · 03/16/2002 (3:12 pm) · 2 replies

Hello,
I am trying to save a datablock to a file.
I have found a command but cant get it to work.
The command is: %obj.save(%filename);
If I were to try and save a datablock like the RifleFireEmitter datablock I would go:
RifleFireEmitter.save("./somefile.cs");.
When the command is issued it seems to do nothing, there are no errors or anything.

What am I doing wrong?
Does somefile.cs have to allready exist?

#1
03/26/2002 (3:48 pm)
anyone?
#2
03/26/2002 (3:53 pm)
I'm guessing that the relative pathing stuff hasn't been added to the SimObject save method. Try using a full (rooted in the exe dir) path ie. "fps/blah/blah/blah"