property_exists
Jump to navigation
Jump to search
Function Syntax
boolean property_exists( string name, boolean? global )
- Checks whether a property exists.
- name: Name of the property
- global: If
true
, only checks global properties. Iffalse
, only checks user-specific properties. If omitted, checks both global and user properties.
The following properties are built-in and always return true
:
- Choice adventure properties (Those that start with
choiceAdventure
) - Skill use priority during MP burning (Those that start with
skillBurn
) - Positions of various windows (
AnnouncementFrame
,CakeArenaFrame
, ...) - Position of the main window (
KoLDesktop
)
This function was added in r17892.
Code Samples
The following sample checks if a custom property named my_pref
exists, and deletes it.
if ( property_exists( "my_pref" ) )
{
remove_property( "my_pref" );
}