# Catalog Field Exists

Grammar — Does catalog field of scope exist?
FlagsNative | 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 ] — Scope
  • string [ catalogfieldname ] — Field

Returns — bool

native bool CatalogFieldExists(string scope, string field);

Category: Catalog / Lookup

# Examples

# campaigns/voidstory.sc2campaign

VoidCampaignLib.galaxy

// 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

LibCOOC.galaxy

// 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")