Difference between revisions of "TIniFile.UpdateFile"

From Soldat Community Wiki
Jump to: navigation, search
(new page)
 
(No difference)

Latest revision as of 00:29, 23 August 2013

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.