settings.getDetails

From ComputerCraft
Jump to navigation Jump to search

settings.getDetails
Function
Syntax
settings.getDetails()
Returns table details
API settings
Source CC:Tweaked (source)

Get a table with details about a setting.

The table contains the folowing keys:
changed: If the setting has ever changed.
default: If the setting has the defualt value.
description: A description of the setting.
type The type of the value of the setting.
value: The alue of the setting. same as settings.get.

ExampleExamplePrint details of a setting
Print the details of the setting "shell.autocomplete".
Code
local details = settings.getDetails("shell.autocomplete")
if details["changed"] then
    print("This setting has been changed")
end
if details["default"] then
    print("This setting has the default value")
end
print("The description of this setting is: " .. details["description"])
print("The type of this setting is: " .. details["type"])
print("The value of this setting is: " .. tostring(details["value"]))

,