<?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%2Frooms</id>
	<title>Manual:DIL Manual/rooms - 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%2Frooms"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/rooms&amp;action=history"/>
	<updated>2026-11-22T20:22:11Z</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/rooms&amp;diff=2855&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/rooms&amp;diff=2855&amp;oldid=prev"/>
		<updated>2026-11-14T23:08:58Z</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;= rooms =&lt;br /&gt;
'''Field''' (unitptr, read-only; on a zoneptr).&lt;br /&gt;
&lt;br /&gt;
 z.rooms : unitptr&lt;br /&gt;
&lt;br /&gt;
One room of the zone: the one whose symbolic name sorts first. It is a way to get some room in a zone, as the &amp;lt;code&amp;gt;goto&amp;lt;/code&amp;gt; command in commands.zon does when given a zone name.&lt;br /&gt;
&lt;br /&gt;
It is not the start of a list of the zone's rooms: [[Manual:DIL Manual/next|next]] on the room gives the next unit in the same place, not the next room of the zone. To reach a particular room, use &amp;lt;code&amp;gt;findroom(&amp;quot;name@zone&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* It fails on a null zoneptr and on a zone without rooms. A failed value isn't assigned: after &amp;lt;code&amp;gt;u := z.rooms;&amp;lt;/code&amp;gt; on such a zone, &amp;lt;code&amp;gt;u&amp;lt;/code&amp;gt; still holds what it held before, so set it to null first.&lt;br /&gt;
* It can't be assigned (vmc: &amp;quot;Illegal lvalue&amp;quot;).&lt;br /&gt;
* Like every field name, &amp;lt;code&amp;gt;rooms&amp;lt;/code&amp;gt; is a reserved word: no variable can have that name.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin goto_zone(pc : unitptr, zonename : string);&lt;br /&gt;
var&lt;br /&gt;
   z : zoneptr;&lt;br /&gt;
   room : unitptr;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   z := findzone(zonename);&lt;br /&gt;
   if (z == null)&lt;br /&gt;
      return;&lt;br /&gt;
   room := null;&lt;br /&gt;
   room := z.rooms;&lt;br /&gt;
   if (room == null)&lt;br /&gt;
      return;&lt;br /&gt;
   link(pc, room);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Takes a god to a room in the named zone, as &amp;lt;code&amp;gt;goto&amp;lt;/code&amp;gt; does in commands.zon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/roomcount|roomcount]]&lt;br /&gt;
* [[Manual:DIL Manual/objs|objs]]&lt;br /&gt;
* [[Manual:DIL Manual/npcs|npcs]]&lt;br /&gt;
* [[Manual:DIL Manual/findroom()|findroom()]]&lt;br /&gt;
* [[Manual:DIL Manual/findzone()|findzone()]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>