property_has_default
Revision as of 10:43, 23 December 2020 by Philmasterplus (talk | contribs) (Created page with "<onlyinclude>{{{{{format|Function2}}} |name=property_has_default |function1.return_type=boolean |function1.description=Checks if a property has a built-in default value. |func...")
Function Syntax
boolean property_has_default( string name )
- Checks if a property has a built-in default value.
- name: Property name
All properties in defaults.txt
have a default value.
This function was added in r17892.
Code Samples
Check if a property named autoBuyPriceLimit
has a default value, and if so, print it.
if ( property_has_default( "autoBuyPriceLimit" ) )
{
print( property_default_value( "autoBuyPriceLimit" ) );
}