This line
Code:
ReadFileString(theFile, tempStr, FileSize(theFile));
Also Now when I try this instead...
Code:
program New;
var
v : string;
procedure Save_Usernames(str: String);
var
theFile: Integer;
tempStr: String;
begin
if (FileExists(ScriptPath + 'Yaboe_Usernames11.txt')) then
begin
theFile := OpenFile(ScriptPath + 'Yaboe_Usernames11.txt', false);
ReadFileString(theFile, tempStr, FileSize(theFile));
CloseFile(theFile);
end;
theFile := RewriteFile(ScriptPath + 'Yaboe_Usernames11.txt', false)
WriteFileString(theFile, tempStr + str + #10#13);
CloseFile(theFile);
end;
begin
V := 'blahblahblahblah';
Save_Usernames(V);
end.
I get this...
Code:
[Runtime Error] : Exception: Access violation at address 0077AE65 in module 'scar.exe'. Read of address FFFFFFFC in line 18 in script
Line 18 is this...
Code:
WriteFileString(theFile, tempStr + str + #10#13);