# Catalog Field Exists
Grammar — Does catalog field of scope exist?
Flags —Native
|Function
Returns true if the specified field exists in the specified scope. Use catalog lookup functions to retrieve a data value or other information from the game data.
# Arguments
string
[ catalogscope ] — Scopestring
[ catalogfieldname ] — Field
Returns — bool
native bool CatalogFieldExists(string scope, string field);
# Related
Category: Catalog / Lookup
- [F] —
bool
— Catalog Entry Is Default — ( CatalogEntryIsDefault ) - [F] —
bool
— Catalog Entry Is Valid — ( CatalogEntryIsValid ) - [F] —
int
— Catalog Entry Class — ( CatalogEntryClass ) - [F] —
int
— Catalog Entry Count — ( CatalogEntryCount ) - [F] —
string
[ catalogentry ] — Catalog Entry Get — ( CatalogEntryGet ) - [F] —
string
[ catalogentry ] — Catalog Entry Parent — ( CatalogEntryParent ) - [F] —
string
[ catalogscope ] — Catalog Entry Scope — ( CatalogEntryScope ) - [F] —
int
— Catalog Field Count — ( CatalogFieldCount ) - [F] —
string
[ catalogfieldname ] — Catalog Field Get — ( CatalogFieldGet ) - [F] —
bool
— Catalog Field Exists — ( CatalogFieldExists ) - [F] —
bool
— Catalog Field Is Array — ( CatalogFieldIsArray ) - [F] —
bool
— Catalog Field Is Scope — ( CatalogFieldIsScope ) - [F] —
string
— Catalog Field Type — ( CatalogFieldType ) - [F] —
int
[ preset::FieldTypeCategory ] — Catalog Field Type Category — ( CatalogFieldTypeCategory ) - [F] —
string
— Catalog Field Value Get — ( CatalogFieldValueGet ) - [F] —
int
— Catalog Field Value Get As Integer — ( CatalogFieldValueGetAsInt ) - [F] —
int
— Catalog Field Value Get Flags As Integer — ( CatalogFieldValueGetFlagsAsInt ) - [F] —
fixed
— Catalog Field Value Get As Real — ( libNtve_gf_CatalogFieldValueGetAsReal ) - [F] —
int
— Catalog Field Value Count — ( CatalogFieldValueCount ) - [F] —
string
— Catalog Reference Get — ( CatalogReferenceGet ) - [F] —
int
— Catalog Reference Get As Integer — ( CatalogReferenceGetAsInt ) - [F] —
fixed
— Catalog Reference Get As Real — ( libNtve_gf_CatalogReferenceGetAsReal ) - [F] —
int
— Catalog Reference Count — ( CatalogReferenceCount ) - [F] —
int
[ preset::AbilityClass ] — Class Of Ability — ( AbilityClass ) - [F] —
fixed
— Cost Of Ability — ( libNtve_gf_CostOfAbility )
# Examples
# campaigns/voidstory.sc2campaign
// L5734
CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost")
// L5735
CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray")
// L5746
CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost")
// L5747
CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray")
# mods/starcoop/starcoop.sc2mod
// L3450
CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost")
// L3451
CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray")
// L3462
CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost")
// L3463
CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray")