<?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%2Ftitle</id>
	<title>Manual:DIL Manual/title - 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%2Ftitle"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/title&amp;action=history"/>
	<updated>2026-11-22T22:56:28Z</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/title&amp;diff=2875&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/title&amp;diff=2875&amp;oldid=prev"/>
		<updated>2026-11-14T23:10:34Z</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;= title =&lt;br /&gt;
'''Field''' (string; units: all, read/write; also on zoneptr, read-only in practice).&lt;br /&gt;
&lt;br /&gt;
 u.title : string&lt;br /&gt;
 z.title : string&lt;br /&gt;
&lt;br /&gt;
* '''unitptr''': the unit's title. For an object or an NPC it is the short name the game's messages use: &amp;lt;code&amp;gt;$1n&amp;lt;/code&amp;gt; in [[Manual:DIL Manual/act()|act()]] shows the title of anything but a player (&amp;lt;code&amp;gt;&amp;quot;a long sword&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;the cityguard&amp;quot;&amp;lt;/code&amp;gt;). For a room it is the heading shown on &amp;lt;code&amp;gt;look&amp;lt;/code&amp;gt;. For a player it is the text shown after the name; the guild masters in guilds.zon set it to &amp;quot;the&amp;quot;, the race and the guild rank. Messages use a player's [[Manual:DIL Manual/name|name]] instead.&lt;br /&gt;
* '''zoneptr''': the zone's title, from &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; in the zone's &amp;lt;code&amp;gt;%zone&amp;lt;/code&amp;gt; header.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* On a unit, assigning a string replaces the title; assigning null or &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; empties it.&lt;br /&gt;
* A zone's title can't be changed. vmc accepts &amp;lt;code&amp;gt;z.title := ...&amp;lt;/code&amp;gt;, but at run time the program logs &amp;quot;DIL SERIOUS: ... Type error in ordinary string assignment &amp;lt;- hash&amp;quot; and stops, and the title stays as it was.&lt;br /&gt;
* When renaming an object or NPC, change [[Manual:DIL Manual/outside descr|outside_descr]] and [[Manual:DIL Manual/names|names]] to match.&lt;br /&gt;
* On null it fails.&lt;br /&gt;
* &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; is a reserved word: it can't be a variable name.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin where_am_i();&lt;br /&gt;
var&lt;br /&gt;
   room : unitptr;&lt;br /&gt;
   z : zoneptr;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   room := self.outside;&lt;br /&gt;
   z := findzone(room.zoneidx);&lt;br /&gt;
   sendtext(&amp;quot;You are in &amp;quot; + room.title + &amp;quot;, in &amp;quot; + z.title + &amp;quot;.&amp;lt;br/&amp;gt;&amp;quot;, self);&lt;br /&gt;
   quit;&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tells a player the titles of the room and the zone they are in.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/name|name]]&lt;br /&gt;
* [[Manual:DIL Manual/names|names]]&lt;br /&gt;
* [[Manual:DIL Manual/outside descr|outside_descr]]&lt;br /&gt;
* [[Manual:DIL Manual/findzone()|findzone()]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>