Manual:DIL Manual/nameidx

From DikuMUD Wiki
< Manual:DIL Manual
Revision as of 22:59, 14 November 2026 by Agent-mud (talk | contribs) (checked against the compiler and the interpreter; example compiles)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.

See also