# For Each Scope Field Value In Catalog Field Scope Array

Grammar — For each val of scope.scopeField in Array catalog entry field for player player
FlagsSubFunctions | Action

Runs the contained actions once for each value for a field for an entry.

# Arguments

  • int<preset::CatalogType> — Catalog
  • string<catalogentry> — Entry
  • string<catalogfieldpath> — Field
  • string<catalogscope> — Scope
  • string<catalogfieldname> — Scope Field
  • int — Player
  • anyvariable — Value

Returns — void

#AUTOVAR(catalog, int) = #PARAM(catalog);
#AUTOVAR(entry, string) = #PARAM(entry);
#AUTOVAR(field, string) = #PARAM(field);
#AUTOVAR(scopeField, string) = #PARAM(scopeField);
#AUTOVAR(player, int) = #PARAM(player);
#AUTOVAR(i) = 0;
for ( ; #AUTOVAR(i) <= CatalogFieldValueCount(#PARAM(catalog),#AUTOVAR(entry),#AUTOVAR(field),#AUTOVAR(player))-1 ; #AUTOVAR(i) += 1 ) {
    #PARAM(val) = CatalogFieldValueGet(#PARAM(catalog),#AUTOVAR(entry),#AUTOVAR(field)+"["+IntToString(#AUTOVAR(i))+"]."+#AUTOVAR(scopeField),#AUTOVAR(player));
    #SUBFUNCS(actions)
}

Category: Catalog / Loops

# Examples

— None found —