From ComputerCraft Wiki
Jump to: navigation, search

Grid Redstone.png  Function settings.get
Returns the value of a given setting, or if the setting doesn't exist and a "default" is specified, returns the specified default instead.
Syntax settings.get(string name [, any default])
Returns any value
Part of ComputerCraft
API settings


Grid paper.png  Example
Indicates whether the system is currently configured to boot from disk.
local bootFromDisk = settings.get("shell.allow_disk_startup", "not set")

print("Ability to boot from disk is currently " .. tostring( bootFromDisk ) )
Output Either states "true", "false", or "not set".

Grid disk.png Settings API Functions
settings.set - settings.get - settings.unset - settings.clear - settings.getNames - settings.load -