What it does
OpenPreferences opens s on a Preference object. It takes filename (a string), and answers an integer. That is the first of 3 forms.
Syntax
1
OpenPreferences(filename string) → integer2
OpenPreferences(filename string, flags integer) → integer3
OpenPreferences(filename string, flags integer, encoding integer) → integerParameters
| Name | Type | In forms |
|---|---|---|
| filename | string | all |
| flags | integer | 2, 3 |
| encoding | integer | 3 |
Every form returns
integer
Example · generated
Form 1, the short one
DO Print(OpenPreferences("assets/data.dat")) Sync()LOOPForm 3, with every argument
DO Print(OpenPreferences("assets/data.dat", 1, 1)) Sync()LOOPOpenPreferences is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.