Screenshot cs wrong line? -fixed
by Isaac Barbosa · in Torque Game Builder · 12/08/2007 (8:07 am) · 3 replies
I have discovered that I was unable to take screenshots in my project using 1.5
open screenshot.cs in common/gamescripts and in line 79, change:
%name = expandFileName( "^game/data/screenshots/"
per
%name = expandFileName( "~/data/screenshots/"
note: if that doesn't works you should use a function to fix the file writing to be able to use expandfilenamefix instead of expandfilename
can't remember the thread or author, but the fix is here:
function expandFilenameFix(%thePath) {
%prePath = findfirstfile("*/game/main.cs");
%thePath = stripChars(%thePath,"~");
%thePath = filePath(%prePath) @ %thePath;
}
open screenshot.cs in common/gamescripts and in line 79, change:
%name = expandFileName( "^game/data/screenshots/"
per
%name = expandFileName( "~/data/screenshots/"
note: if that doesn't works you should use a function to fix the file writing to be able to use expandfilenamefix instead of expandfilename
can't remember the thread or author, but the fix is here:
function expandFilenameFix(%thePath) {
%prePath = findfirstfile("*/game/main.cs");
%thePath = stripChars(%thePath,"~");
%thePath = filePath(%prePath) @ %thePath;
}
Torque Owner Isaac Barbosa
IQ Games
So, if somebody knows the fix that would be great to know about it! :)
Thanks!