File location?
by Kevin James · in Torque Game Builder · 04/01/2010 (9:38 am) · 6 replies
In the FileIO tutorial I'm following, the code writes a file:
if(%file.openForWrite("./game/data/test.txt"))
Then reads it in another function:
if(%file.openForRead("./game/data/test.txt"))
The code works, however I can't find the file. I did a search on my entire hard drive and its nowhere to be found. I know this is impossible because the read function displays the text that is written.
Could it be using the registry instead?
if(%file.openForWrite("./game/data/test.txt"))
Then reads it in another function:
if(%file.openForRead("./game/data/test.txt"))
The code works, however I can't find the file. I did a search on my entire hard drive and its nowhere to be found. I know this is impossible because the read function displays the text that is written.
Could it be using the registry instead?
About the author
Computer security, digital forensics, and platform jumper enthusiast. shells.myw3b.net/~syreal/
#2
www.torquepowered.com/community/forums/viewthread/113127
04/01/2010 (10:05 am)
Similar question came up not too long ago:www.torquepowered.com/community/forums/viewthread/113127
#3
If I don't use the dot it goes here:
Application Data\Independent\UntitledGame\game\data
With the dot it goes here:
Application Data\Independent\UntitledGame\game\gameScripts\game\data
Now for the million dollor question: How do I force it to use the game directory of the project?
04/01/2010 (10:18 am)
Thanks Mike! If I don't use the dot it goes here:
Application Data\Independent\UntitledGame\game\data
With the dot it goes here:
Application Data\Independent\UntitledGame\game\gameScripts\game\data
Now for the million dollor question: How do I force it to use the game directory of the project?
#4
tdn.garagegames.com/wiki/TGB/FileIO
Personally, I'd suggest keeping things as they are.
04/01/2010 (10:43 am)
I think the only way to force that would be to undo all the changes in source that enabled this way of file handling since TGB 1.6. You can read up more about it here:tdn.garagegames.com/wiki/TGB/FileIO
Personally, I'd suggest keeping things as they are.
#5
In that case, how do I change this location:
..\Independent\UntitledGame
With multiple projects this directory will get cluttered.
04/01/2010 (10:54 am)
Oh, I thought this was a bug...In that case, how do I change this location:
..\Independent\UntitledGame
With multiple projects this directory will get cluttered.
#6
04/01/2010 (11:04 am)
I found it.
Torque 3D Owner Thomas Bang