Game Development Community

Screenshot cs wrong line? -fixed

by Isaac Barbosa · in Torque Game Builder · 12/08/2007 (4:07 pm) · 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;
}

#1
07/26/2008 (12:52 am)
I have discovered that now, in 1.7.3 is not possible to take a screenshot because something is broken with:

%name = expandFileName( "^game/data/screenshots...

So, if somebody knows the fix that would be great to know about it! :)

Thanks!
#2
07/26/2008 (12:55 am)
It needs to be changed to:

%name = expandFileName( "game/data/screenshots...
#3
07/26/2008 (1:29 am)
Thanks Phillip,

I was trying so many alternatives! -except for that one!-

Cool

Isaac