SRL Archive - OSR Help

writing to local file


twobac

2010-03-25 23:09:33

What function do i use to write to a file. i want to be able to store the values of various variables in a file and use the script to create them, read them and update them. then next time the script is run, to read and update them?

example
Total_Shrimps_Caught =
Total_Shrimps_Cooked =
Total_Shrimps_Burnt =

thanks :)

Awkwardsaw

2010-03-25 23:21:26

procedure WriteINI(Section, KeyName, NewString, FileName: string);
Writes data to an ini-structured file.
Structure:
[Section]
KeyName=NewString

function ReadINI(Section, KeyName, FileName: string): string;
Reads data from an ini-structured file.
Structure:
[Section]
KeyName=SomeString

procedure DeleteINI(Section, KeyName, FileName: string);
Deletes a KeyName from an INI file and if you pass an empty string as KeyName it will delete then entire Section.

:)

twobac

2010-03-25 23:24:41

Cool thanks