fileobject problem
by Steve D · in Torque Game Builder · 02/10/2009 (6:29 pm) · 2 replies
I'm still getting a handle on TGB but I can't figure out writing a simple text file. I brought over code from TGE but when it executes, the file object returns true for opening the file but the file never shows up. Here is the little snippet I made, any ideas? I've read and searched the forums but can't find anything relevant.
function WriteTest()
{
%file = new fileobject();
%filename = "~/data/saves/test.txt";
%filename = expandFilename(%filename);
%ret = %file.OpenForWrite(%filename);
%file.WriteLine("test");
%file.close();
}
function WriteTest()
{
%file = new fileobject();
%filename = "~/data/saves/test.txt";
%filename = expandFilename(%filename);
%ret = %file.OpenForWrite(%filename);
%file.WriteLine("test");
%file.close();
}
Torque Owner Joe Rossi
Indri Games
I'm also having issues with this now trying to integrate the TGE auto updater resource. Everything works great, the md5 hashing, comparing directory structures etc... but when it goes to (over)write the outdated or missing files TGB can't/won't.