<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Log</id>
	<title>Log - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Log"/>
	<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Log&amp;action=history"/>
	<updated>2026-11-30T06:41:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Log&amp;diff=68834&amp;oldid=prev</id>
		<title>Andrew Branscom: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Log&amp;diff=68834&amp;oldid=prev"/>
		<updated>2025-02-16T20:44:21Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:44, 16 February 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Log&amp;diff=68833&amp;oldid=prev</id>
		<title>Andrew Branscom: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Log&amp;diff=68833&amp;oldid=prev"/>
		<updated>2024-06-03T05:07:43Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:07, 3 June 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Log&amp;diff=68832&amp;oldid=prev</id>
		<title>sierraw&gt;Andrew Branscom: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Log&amp;diff=68832&amp;oldid=prev"/>
		<updated>2022-01-28T16:19:43Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;log&amp;#039;&amp;#039;&amp;#039; command adds an entry to the game&amp;#039;s log file.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
log([[message|msg]] mLOGMSG);&amp;lt;br /&amp;gt;&lt;br /&gt;
log(&amp;quot;log message&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;log&amp;#039;&amp;#039;&amp;#039; command is often used during [[AGI Debugging Information|debugging]] of games. It allows the programmer to capture some basic information and save it to a file that can later be examined to make corrections and improvements to a game.&lt;br /&gt;
&lt;br /&gt;
If the game&amp;#039;s log file (named &amp;#039;logfile&amp;#039;) does not exist in the game&amp;#039;s directory, it will be automatically created. If the file already exists, the log entry is appended to the existing file.&lt;br /&gt;
&lt;br /&gt;
The logfile entry is written in three lines, in the following format:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;Room &amp;lt;#&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Input line: &amp;lt;text&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;message&amp;gt;&amp;lt;/CODE&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
The [[room]] number is the current value if [[reserved variable]] [[v0]]. The input line value is the most recent line of text that was entered on the [[input line]]. The text of [[message]] &amp;#039;&amp;#039;&amp;#039;mLOGMSG&amp;#039;&amp;#039;&amp;#039; is added as the last line.&lt;br /&gt;
&lt;br /&gt;
If AGI encounters any file errors while trying to open or write to the logfile, it just ignores the errors, and does not write the log file entry.&lt;br /&gt;
&lt;br /&gt;
== Possible Errors ==&lt;br /&gt;
&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;agi&amp;quot;&amp;gt;&lt;br /&gt;
[ commonly used entry to track which words players are &lt;br /&gt;
[ using in a game; can help improve the WORDS.TOK file&lt;br /&gt;
if (!isset(haveMatch) &amp;amp;&amp;amp; isset(haveInput) &amp;amp;&amp;amp; unknownWord &amp;gt; 0) &lt;br /&gt;
  {&lt;br /&gt;
  set(haveMatch);&lt;br /&gt;
  reset(haveInput);&lt;br /&gt;
  if (unknownWord == 1)&lt;br /&gt;
    {&lt;br /&gt;
    log(&amp;quot;Unknown word: %w1&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
  ...&lt;br /&gt;
  [ repeat for the other possible word numbers&lt;br /&gt;
  ...&lt;br /&gt;
  if (unknownWord == 10) &lt;br /&gt;
    {&lt;br /&gt;
    log(&amp;quot;Unknown word: %w10&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  print(&amp;quot;Logged an unknown word.&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Technical Information ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; width=&amp;quot;200&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Required Interpreter Version:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| width=&amp;quot;175&amp;quot; | Available in all AGI versions.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Byte-Code Value:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| 144 (0x90 hex)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Debugging Commands]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[AGI Debugging Information]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Category:Commands]]&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>sierraw&gt;Andrew Branscom</name></author>
	</entry>
</feed>