Set property

From Kolmafia
Revision as of 23:21, 10 March 2010 by imported>StDoodle (Created page with '{{ #vardefine:name|set_property}}{{ #vardefine:return_type|void}}{{ FunctionPage| name={{#var:name}}| function_category=Miscellaneous| function1={{Function| name={{#var:name}}|…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
needs(code_samples);

Function Syntax

void set_property(string prop ,string value )

  • prop is the property to set
  • value is the value to set the property to

Looks for a global or appropriate user preference from the saved files (found in your "Settings" directory) and if it finds one that matches, it overrides its value with value. If a match is not found in your existing preferences for prop, it will create a property with that name and set it to value.

CLI Equivalent

The CLI command "set" works similarly.

See Also

get_property()

Special

You can set a custom property that automatically gets its value cleared each new KoL day by prefixing it with an underscore.