How Do I save numbers to an external file?
by Daniel Novatnak · in Torque Game Builder · 03/17/2008 (5:46 pm) · 1 replies
I'm trying to make a Neural Network and I need to save the weights to a file.
I'm using the following lines just to get the program to write to a file in a Behavior:
I don't see the file after I execute these lines, echo(%i) reports 1, so the file is being made.
So, the question remains: Am I in fact making a file that is created and destroyed in an instant since I can't find it in the game's directory, or is there something wrong with my code?
I'm using the following lines just to get the program to write to a file in a Behavior:
%this.file = new FileObject();
%i = %this.file.OpenForWrite("test.txt");
echo(%i);
%this.file.writeline("This is the test file.");
%this.file.close();I don't see the file after I execute these lines, echo(%i) reports 1, so the file is being made.
So, the question remains: Am I in fact making a file that is created and destroyed in an instant since I can't find it in the game's directory, or is there something wrong with my code?
Associate Phillip O'Shea
Violent Tulip