<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ATextLogGetEntry</id>
	<title>API:TextLogGetEntry - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ATextLogGetEntry"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:TextLogGetEntry&amp;action=history"/>
	<updated>2026-10-17T11:08:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:TextLogGetEntry&amp;diff=30783&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:TextLogGetEntry&amp;diff=30783&amp;oldid=prev"/>
		<updated>2026-10-16T19:50:03Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=TextLog}}&lt;br /&gt;
Returns one entry of a text log.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timestamp, filterType, text = TextLogGetEntry(logName, index)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;logName : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of the text log.&lt;br /&gt;
;index : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Position of the entry, starting at &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for the oldest entry. Cut to a whole number.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;timestamp : &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; – Local time the entry was added, formatted as &amp;lt;code&amp;gt;[HH:MM:SS]&amp;lt;/code&amp;gt;.&lt;br /&gt;
;filterType : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – The entry&amp;#039;s filter type.&lt;br /&gt;
;text : &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; – The entry text, after the &amp;lt;code&amp;gt;&amp;amp;lt;BR&amp;amp;gt;&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;&amp;amp;lt;P&amp;amp;gt;&amp;lt;/code&amp;gt; conversion done by [[API:TextLogAddEntry|TextLogAddEntry]].&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* Entries are in the order they were added. When the log is full, the oldest entry is removed, so the entry at a given index changes as new entries arrive.&lt;br /&gt;
* A negative index or an index of [[API:TextLogGetNumEntries|TextLogGetNumEntries]] or more raises the &amp;#039;&amp;#039;Index %d is invalid&amp;#039;&amp;#039; error and returns nothing.&lt;br /&gt;
* The function needs at least two arguments and only reads the last two. Any extra arguments placed in front of them are ignored.&lt;br /&gt;
* The stock UI never calls this function.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;TextLogGetEntry&amp;#039;: Text Log %s does not exist&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;TextLogGetEntry&amp;#039;: Index %d is invalid&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
A minimal example built from the documented signature:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local count = TextLogGetNumEntries( &amp;quot;Chat&amp;quot; )&lt;br /&gt;
if count &amp;gt; 0 then&lt;br /&gt;
    local timestamp, filterType, text = TextLogGetEntry( &amp;quot;Chat&amp;quot;, count - 1 )  -- newest entry&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:TextLogGetNumEntries|TextLogGetNumEntries]]&lt;br /&gt;
* [[API:TextLogAddEntry|TextLogAddEntry]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>