Manual:DIL Manual/nameidx
Jump to navigation
Jump to search
Contents
nameidx
Field (string, read-only; units: all).
u.nameidx : string
The unit's name in its zone file: "cityguard" for cityguard@midgaard. Together with zoneidx it names the unit's definition; symname gives both as "nameidx@zoneidx".
Notes
- For a player it is the player's file name (the name in lower case).
- For a unit with no definition it is
"NO-NAME". - It can't be assigned (vmc: "Illegal lvalue").
- On null it fails.
- Not the same as name, which is the first of the names players use.
Example
dilbegin integer is_familiar(item : unitptr);
code
{
return ((item.nameidx == "familiar2") and (item.zoneidx == "g_q"));
}
dilend
Tells whether an item is one particular unit, as in baseget.zon.