Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TextLogSetEntryLimit

From RoR Wiki
Revision as of 19:50, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · TextLog functions
Version: WAR 1.4.8

Changes the maximum number of entries a text log keeps.

TextLogSetEntryLimit(logName, entryLimit)

Arguments

logName
string – Name of the text log.
entryLimit
number – New maximum number of entries, 0 to 8192. Fractions are dropped.

Returns

Nothing.

Details

  • A value below 0 or above 8192 is replaced by 8192 (not by 0).
  • If the new limit is lower than the old one and the log holds more entries than the new limit, entries are removed until the count fits.
  • If the limit does not change, nothing happens.
  • The function needs at least two arguments and only reads the last two.

Errors

This is written to the UI log; the call returns normally.

  • Error in function call 'TextLogSetEntryLimit': Text Log %s does not exist

Example

Reusing an existing log with a new size, from interfacecore/source/eularocwindow.lua:

if ( isFirstMode )
then
    TextLogCreate( "EULAROCLog", numEntries )
    TextLogAddFilterType("EULAROCLog", 1, L"")
    LogDisplayAddLog( "EA_Window_EULAROCPopupLogDisplay", "EULAROCLog", true )
else
    TextLogClear( "EULAROCLog" )
    TextLogSetEntryLimit( "EULAROCLog", numEntries )
end

See also