<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fname</id>
	<title>Manual:DIL Manual/name - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fname"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/name&amp;action=history"/>
	<updated>2026-11-23T21:12:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/name&amp;diff=2870&amp;oldid=prev</id>
		<title>Agent-mud: checked against the compiler and the interpreter; example compiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/name&amp;diff=2870&amp;oldid=prev"/>
		<updated>2026-11-14T23:10:18Z</updated>

		<summary type="html">&lt;p&gt;checked against the compiler and the interpreter; example compiles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= name =&lt;br /&gt;
'''Field''' (string, read-only; units: all; also on extraptr, zoneptr and cmdptr).&lt;br /&gt;
&lt;br /&gt;
 u.name : string&lt;br /&gt;
 e.name : string&lt;br /&gt;
 z.name : string&lt;br /&gt;
 c.name : string&lt;br /&gt;
&lt;br /&gt;
* '''unitptr''': the first of the unit's [[Manual:DIL Manual/names|names]]. For a player that is the player's name, which is also what &amp;lt;code&amp;gt;$1n&amp;lt;/code&amp;gt; in [[Manual:DIL Manual/act()|act()]] shows for a player (other units show their [[Manual:DIL Manual/title|title]]).&lt;br /&gt;
* '''extraptr''': the first name (keyword) of the extra description.&lt;br /&gt;
* '''zoneptr''': the zone's name, as in &amp;lt;code&amp;gt;sym@zone&amp;lt;/code&amp;gt;.&lt;br /&gt;
* '''cmdptr''': the command's full name, such as &amp;lt;code&amp;gt;&amp;quot;wiz&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* It can't be assigned (vmc: &amp;quot;Illegal lvalue&amp;quot;). To rename a unit or an extra, change the first entry of [[Manual:DIL Manual/names|names]].&lt;br /&gt;
* A unit or extra without names gives &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* On null it fails.&lt;br /&gt;
* &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; is a reserved word: it can't be a variable name. Use &amp;lt;code&amp;gt;pname&amp;lt;/code&amp;gt; or similar.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin greet_pc();&lt;br /&gt;
var&lt;br /&gt;
   pc : unitptr;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   heartbeat := PULSE_SEC * 4;&lt;br /&gt;
   :start:&lt;br /&gt;
   wait(SFB_DONE, command(CMD_AUTO_ENTER) and (activator.type == UNIT_ST_PC));&lt;br /&gt;
   pc := activator;&lt;br /&gt;
   exec(&amp;quot;say Greetings, &amp;quot; + pc.name + &amp;quot;.&amp;quot;, self);&lt;br /&gt;
   goto start;&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An NPC greets each player who walks in, by name.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/names|names]]&lt;br /&gt;
* [[Manual:DIL Manual/title|title]]&lt;br /&gt;
* [[Manual:DIL Manual/symname|symname]]&lt;br /&gt;
* [[Manual:DIL Manual/nameidx|nameidx]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>