<?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%2Fdescr</id>
	<title>Manual:DIL Manual/descr - 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%2Fdescr"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/descr&amp;action=history"/>
	<updated>2026-11-24T04:21:27Z</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/descr&amp;diff=2873&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/descr&amp;diff=2873&amp;oldid=prev"/>
		<updated>2026-11-14T23:10:28Z</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;= descr =&lt;br /&gt;
'''Field''' (string, read/write; on extraptr).&lt;br /&gt;
&lt;br /&gt;
 e.descr : string&lt;br /&gt;
&lt;br /&gt;
The text of an extra description: what a player sees on &amp;lt;code&amp;gt;look at&amp;lt;/code&amp;gt; the extra's name. Extras the game keeps for itself (names starting with &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;) often keep data in it, such as a time or a name.&lt;br /&gt;
&lt;br /&gt;
Units have no &amp;lt;code&amp;gt;descr&amp;lt;/code&amp;gt; field: theirs are [[Manual:DIL Manual/outside descr|outside_descr]] and [[Manual:DIL Manual/inside descr|inside_descr]] (vmc: &amp;quot;Illegal type for field&amp;quot;). The &amp;lt;code&amp;gt;descr&amp;lt;/code&amp;gt; keyword in a zone file sets one of those two.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Assigning a string replaces the text; assigning null or &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; empties it.&lt;br /&gt;
* On null it fails, and an assignment to it does nothing: &amp;lt;code&amp;gt;u.extra.[&amp;quot;$x&amp;quot;].descr := &amp;quot;a&amp;quot;;&amp;lt;/code&amp;gt; adds nothing when the unit has no &amp;lt;code&amp;gt;$x&amp;lt;/code&amp;gt; extra. Make one with [[Manual:DIL Manual/addextra()|addextra()]].&lt;br /&gt;
* Extra variables are null again after every &amp;lt;code&amp;gt;wait&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;pause&amp;lt;/code&amp;gt;: look the extra up again after waiting.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin last_visitor();&lt;br /&gt;
var&lt;br /&gt;
   exd : extraptr;&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;
   exd := &amp;quot;$last_visitor&amp;quot; in self.extra;&lt;br /&gt;
   if (exd == null)&lt;br /&gt;
      addextra(self.extra, {&amp;quot;$last_visitor&amp;quot;}, activator.name);&lt;br /&gt;
   else&lt;br /&gt;
      exd.descr := activator.name;&lt;br /&gt;
   goto start;&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Keeps the name of the last player to come in, in a hidden extra on the unit.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/extra|extra]]&lt;br /&gt;
* [[Manual:DIL Manual/vals|vals]]&lt;br /&gt;
* [[Manual:DIL Manual/names|names]]&lt;br /&gt;
* [[Manual:DIL Manual/addextra()|addextra()]]&lt;br /&gt;
* [[Manual:DIL Manual/extraptr|extraptr]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>