Log in

View Full Version : Save to text/getdebugtext



Main
11-22-2011, 10:59 PM
I am trying to write a bunch of lines to an file/ini in the following format
( x1, y1)
( x2, y2)

right now if i use writeini I get stuff like this
1= ( x1, y1)
2= ( x2, y2)
and I can't seems to find a way to get rid of the 1=, 2= ..etc I'd remove them by hand but I got about 1000-10000 of lines of data and would be quite hard for me to remove them all


Is there a way to get around that? I know that before we had GetDebugText for scar, and zephy got a procedure that would save debug to text, but is there something like that for simba?

Wizzup?
11-22-2011, 11:03 PM
You can just write to a (non-INI) file? Plus, there are many ways to edit text. You could do a mass find+replace, or apply a regex to the file, or use Vim's block editing mode.

Main
11-23-2011, 12:25 AM
what do you mean by "write to a (non-INI) file"?
The only two thing I know is writeini and zephy's thinggie
WriteFileString( RewriteFile(ScriptPath + DebugName + '.txt', False), GetDebugText);
Writeln( 'Saved debug to file: ' + ScriptPath + DebugName + '.txt');
CloseFile( DebugFile);

Wizzup?
11-23-2011, 12:36 AM
Instead of Writeln(s) just do WriteToFile(s+'#10#13');