WHUserApi::LookupUnitByName (open)

Find a child unit within a parent unit

Syntax

LOADLIB "mod::wrd/lib/internal/userapi.whlib";

INTEGER FUNCTION LookupUnitByName(INTEGER parent, STRING unitname)

Parameters

INTEGER parent

Parent unit id, 0 for root units

STRING unitname

Name of the unit (case insensitive)

Return value

INTEGER

Unit id, 0 if not found