SRL Archive - OSR Help

#13


Death12652

2010-05-17 22:33:25

Here's what I have


procedure Save_Usernames(str: String);
var
theFile: Integer;
tempStr: String;
begin
if (FileExists(ScriptPath + 'Yaboe_Usernames.txt')) then
begin
theFile := OpenFile(ScriptPath + 'Yaboe_Usernames.txt', false);
ReadFileString(theFile, tempStr, FileSize(theFile));
CloseFile(theFile);
end;

theFile := RewriteFile(ScriptPath + 'Yaboe_Usernames.txt', false)
WriteFileString(theFile, Name + #13 + tempStr + str + #32#32#32#32#32 + FloatToStr(ext) + #32 + #13);
CloseFile(theFile);
end;

The "Name" part is a constant. I need that to write to the top Only once. But instead I get it every time I run the script. Also the #13 I thought was suppose to go to the next line? that doesn't work either? Also, I am running windows OS. Also the ext part is and extended variable. And is this…


var
ext: Extended;//global variable
procedure blah;
var Count : integer;
begin
Count := 0
incEx(Count, 5)
ext := Count * 0.01;
ClearReport;
AddToReport(FloatToStr(ext));
Alert(FloatToStr(ext));

This is what I get…


DeathDeathDeathStikser19877 0 Haepwar404 0 Seagetia075 0

Death is my name part

the other names + numbers is username

the 0 is the ext.

Awkwardsaw

2010-05-17 22:46:54

try #10

i luffs yeww

2010-05-17 23:44:54

I read Coh3n saying that you needed #13#10 (or vice versa (or with a + in between the chars)). Try that? :)

Dgby714

2010-05-18 01:06:54

Well seeing as its windows use "#13#10"!

Sex

2010-05-18 01:11:44

Yeah you have to do #13#10 as #13 is carriage return and #10 is line feed.

Gu3st...

2010-05-18 07:57:25

Windows use #13#10
Linux use #10