TIniFile.UpdateFile

From Soldat Community Wiki
Revision as of 01:29, 23 August 2013 by Mighty (talk | contribs) (new page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.