SlashCo Wiki

SlashCo.FindItemWithField

 string, table SlashCo.FindItemWithField( string key, any value )

Description

Finds the first registered item whose given field matches a value.

Arguments

1string key

Field name to check on each item table.

2any value

Value the field must equal.

Returns

1string name

Name of the matching item, or nil if none was found.

2table itemTbl

The matching item table, or nil if none was found.