TIniFile.UpdateFile

From Soldat Community Wiki
Jump to: navigation, search
procedure UpdateFile()

Description

This procedure tries to update or create the file assigned to TIniFile.

Example

Example changes the server's adminlog

const
  // assuming Sandbox Level < 2
  PATH = 'soldat.ini';

var
  Ini: TIniFile;

begin
  Ini := File.CreateINI(PATH);
  Ini.WriteString('NETWORK','Admin_Password','TakeMyPreviligesAway');
  Ini.UpdateFile;
  Ini.Free;

  Game.LoadCon(PATH);
end.