procedure _PF_SaveSettings();
var
i, j: Integer;
Path, FilePath: String;
List: TStringList;
begin
Path := AppPath + 'Scripts/' + PlayerForm.MainForm.getCaption() + '/';
FilePath := Path + 'Settings.txt';
DebugLn(Format('PlayerForm: Saving player settings to %s', [Path]));
if (Length(PlayerForm.Players) = 0) then
Exit();
if (not DirectoryExists(Path)) then
ForceDirectories(Path);
if (DirectoryExists(Path)) then
begin
if (FileExists(FilePath)) then
DeleteFile(FilePath);
List.Init();
try
List.Add(Format('<Army>%s</Army>', [playerForm.__loadedArmyName]));
List.Add('');
for i := 0 to High(PlayerForm.Players) do
begin
List.Add(Format('<%s>', [PlayerForm.Players[i].LoginName]));
List.Add(' ' + ToString(PlayerForm.Players[i].Settings));
List.Add(Format('</%s>', [PlayerForm.Players[i].LoginName]));
List.Add('');
end;
finally
if (Length(List.getText()) > 0) then
List.SaveToFile(FilePath);
List.Free();
end;
end;
end;
It seems like scriptsettingsPath isn't being used anymore (although it is still defined as a string within the srlplayerform). You could edit the above procedure in the srlplayerform to save to a different location.