remove_property

From Kolmafia
Revision as of 11:17, 23 December 2020 by Philmasterplus (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

string remove_propertystring prop, boolean? global )

Removes or resets a property and returns its previous value.
  • prop: Property name
  • global: If true, removes a global property. If false, removes a user property. If omitted, this checks both user and global properties.

If the property has a default value, it will be reset to its default value instead.

This function was added in r17892.

Code Samples

Remove a property named myPref and print its previous value.

print( "Removed myPref, old value was " + remove_property( "myPref" ) );

See Also

get_all_properties() | property_exists() | property_has_default() | property_default_value() | get_property() | set_property() | remove_property() | rename_property()