# 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
Flags —SubFunctions
|Action
Runs the contained actions once for each value for a field for an entry.
# Arguments
int
<preset::CatalogType> — Catalogstring
<catalogentry> — Entrystring
<catalogfieldpath> — Fieldstring
<catalogscope> — Scopestring
<catalogfieldname> — Scope Fieldint
— Playeranyvariable
— 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)
}
# Related
Category: Catalog / Loops
- For Each Catalog Entry In Catalog — macro
- For Each Value In Catalog Field Array — macro
- For Each Scope Field Value In Catalog Field Scope Array — macro
# Examples
— None found —