settings.unset
From ComputerCraft Wiki
Revision as of 03:10, 10 June 2016 by Bomb Bloke (Talk | contribs) (Created page with "{{lowercase}} {{Function |name=settings.unset |args={{Type|string}} setting |api=settings |addon=ComputerCraft |desc=Removes a setting from the currently loaded set. If you wi...")
Function settings.unset | |
Removes a setting from the currently loaded set. If you wish to unload all settings, refer to settings.clear(). | |
Syntax | settings.unset(string setting) |
Returns | nil |
Part of | ComputerCraft |
API | settings |
Examples
Example | |
Randomly unsets a setting. | |
Code |
local curSettings = settings.getNames() print("Initial loaded settings:\n") textutils.pagedTabulate( curSettings ) if #curSettings > 0 then settings.unset( curSettings[ math.random( #curSettings ) ] ) end print("\nResulting loaded settings:\n") textutils.pagedTabulate( settings.getNames() ) |
Settings API Functions |
---|
settings.set - settings.get - settings.unset - settings.clear - settings.getNames - settings.load - settings.save |