<?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%3ATextLogAddSingleByteEntry</id>
	<title>API:TextLogAddSingleByteEntry - 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%3ATextLogAddSingleByteEntry"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:TextLogAddSingleByteEntry&amp;action=history"/>
	<updated>2026-10-19T02:59:58Z</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:TextLogAddSingleByteEntry&amp;diff=30777&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:TextLogAddSingleByteEntry&amp;diff=30777&amp;oldid=prev"/>
		<updated>2026-10-16T19:49:57Z</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;
Adds a line of text to a text log, taking the text as an ordinary Lua string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TextLogAddSingleByteEntry(logName, filterType, text)&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;
;filterType : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Filter type of the entry. Cut to a whole number.&lt;br /&gt;
;text : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – The text, as a plain Lua string (not a wide string).&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* This is [[API:TextLogAddEntry|TextLogAddEntry]] for single-byte text. Each byte of &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; becomes one character; there is no UTF-8 decoding, so only plain ASCII text comes out as written.&lt;br /&gt;
* The text is cut to 1023 characters.&lt;br /&gt;
* Nothing is added if the log is disabled ([[API:TextLogSetEnabled|TextLogSetEnabled]]) or if the entry&amp;#039;s filter type is switched off in the log.&lt;br /&gt;
* If the log already holds as many entries as its entry limit, the oldest entries are removed first. A log with an entry limit of 0 stores nothing.&lt;br /&gt;
* In the text, &amp;lt;code&amp;gt;&amp;amp;lt;BR&amp;amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;amp;lt;br&amp;amp;gt;&amp;lt;/code&amp;gt; become a line break and &amp;lt;code&amp;gt;&amp;amp;lt;P&amp;amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;amp;lt;p&amp;amp;gt;&amp;lt;/code&amp;gt; become two line breaks.&lt;br /&gt;
* The entry is stamped with the local time (shown by [[API:LogDisplaySetShowTimestamp|LogDisplaySetShowTimestamp]] and returned by [[API:TextLogGetEntry|TextLogGetEntry]]).&lt;br /&gt;
* If incremental saving is on (see [[API:TextLogSetIncrementalSaving|TextLogSetIncrementalSaving]]), the entry is also written to the log file as &amp;lt;code&amp;gt;[YY/MM/DD][HH:MM:SS] &amp;lt;/code&amp;gt; followed by the filter name and the text, with nothing between them.&lt;br /&gt;
* The log&amp;#039;s update event (see [[API:TextLogGetUpdateEventId|TextLogGetUpdateEventId]]) fires with &amp;lt;code&amp;gt;SystemData.TextLogUpdate.ADDED&amp;lt;/code&amp;gt; and the filter type.&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;TextLogAddEntry&amp;#039;: Text Log %s does not exist&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;The message names &amp;lt;code&amp;gt;TextLogAddEntry&amp;lt;/code&amp;gt;, not this function.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
A minimal example built from the signature above:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TextLogAddSingleByteEntry( &amp;quot;Chat&amp;quot;, SystemData.ChatLogFilters.MISC, &amp;quot;Hello&amp;quot; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:TextLogAddEntry|TextLogAddEntry]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>