<?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%2Foutside</id>
	<title>Manual:DIL Manual/outside - 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%2Foutside"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/outside&amp;action=history"/>
	<updated>2026-11-23T20:38:57Z</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/outside&amp;diff=2877&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/outside&amp;diff=2877&amp;oldid=prev"/>
		<updated>2026-11-14T23:10:40Z</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;= outside =&lt;br /&gt;
'''Field''' (unitptr, read-only; units: all).&lt;br /&gt;
&lt;br /&gt;
 u.outside : unitptr&lt;br /&gt;
&lt;br /&gt;
The unit that &amp;lt;code&amp;gt;u&amp;lt;/code&amp;gt; is in: the room a character stands in, the character carrying or wearing an object, the container an object lies in. Null for a room that isn't inside another unit.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* It can't be assigned (vmc: &amp;quot;Illegal lvalue&amp;quot;). Move a unit with [[Manual:DIL Manual/link()|link()]], or move a character through an exit with &amp;lt;code&amp;gt;exec(&amp;quot;north&amp;quot;, u)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* After &amp;lt;code&amp;gt;exec(&amp;quot;&amp;amp;lt;dir&amp;amp;gt;&amp;quot;, self)&amp;lt;/code&amp;gt;, compare &amp;lt;code&amp;gt;self.outside&amp;lt;/code&amp;gt; with the room before to see whether the move worked.&lt;br /&gt;
* An object that is worn is still inside its wearer: &amp;lt;code&amp;gt;outside&amp;lt;/code&amp;gt; is the character, and [[Manual:DIL Manual/equip|equip]] tells where it is worn.&lt;br /&gt;
* The units inside &amp;lt;code&amp;gt;u&amp;lt;/code&amp;gt; are found with [[Manual:DIL Manual/inside|inside]] and [[Manual:DIL Manual/next|next]].&lt;br /&gt;
* On null it fails.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin unitptr room_of(u : unitptr);&lt;br /&gt;
var&lt;br /&gt;
   r : unitptr;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   r := u;&lt;br /&gt;
   while (r)&lt;br /&gt;
   {&lt;br /&gt;
      if (r.type == UNIT_ST_ROOM)&lt;br /&gt;
         return (r);&lt;br /&gt;
      r := r.outside;&lt;br /&gt;
   }&lt;br /&gt;
   return (r);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finds the room a unit is in, however deep it is packed (a coin in a purse in a sack carried by a player).&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/inside|inside]]&lt;br /&gt;
* [[Manual:DIL Manual/next|next]]&lt;br /&gt;
* [[Manual:DIL Manual/link()|link()]]&lt;br /&gt;
* [[Manual:DIL Manual/equip|equip]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>