Difference between revisions of "Settings.load"
From ComputerCraft Wiki
Bomb Bloke (Talk | contribs) (Created page with "{{lowercase}} {{Function |name=settings.load |args=string path |returns=boolean success |api=settings |addon=ComputerCraft |desc=Loads settings from the...") |
Bomb Bloke (Talk | contribs) m (Type templates) |
||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=settings.load | |name=settings.load | ||
− | |args= | + | |args={{Type|string}} path |
− | |returns= | + | |returns={{Type|boolean}} success |
|api=settings | |api=settings | ||
|addon=ComputerCraft | |addon=ComputerCraft |
Revision as of 02:37, 10 June 2016
Function settings.load | |
Loads settings from the specified file. Any settings that've already been loaded (eg the defaults) will not be affected unless the target file contains entries with the same names. If a file titled ".settings" is saved to the root of a computer's drive, it will be automatically loaded on startup (without need to call this function manually). | |
Syntax | settings.load(string path) |
Returns | boolean success |
Part of | ComputerCraft |
API | settings |
Examples
Example | |
Loads all settings specified within the file "mySettings", displaying before / after lists. | |
Code |
print("Initial loaded settings:\n") textutils.pagedTabulate( settings.getNames() ) settings.load("mySettings") print("Resulting loaded settings:\n") textutils.pagedTabulate( settings.getNames() ) |
Settings API Functions |
---|
settings.set - settings.get - settings.unset - settings.clear - settings.getNames - settings.load - settings.save |