Quantcast
Download
(5 Kb)
Download
Updated: 03/02/20 01:26 PM
Compatibility:
Harrowstorm (5.3.4)
Updated:03/02/20 01:26 PM
Created:05/28/19 09:18 AM
Monthly downloads:46,937
Total downloads:95,817
Favorites:135
MD5:
Categories:Libraries, Data Mods
5.3.4
LibChatMessage  Popular! (More than 5000 hits)
Version: 1.1.3
by: sirinsidiator [More]
For years addon authors have abused the debug methods d(), df() and CHAT_SYSTEM:AddMessage() to show messages in chat or even added text directly to the chat buffer, preventing other addons from interacting with the output. LibChatMessage offers an easy alternative that uses the same method as the vanilla UI to print system messages.

Features

Chat Messages
The main purpose of the library is to provide an easy API that can be used to print messages in chat. This is done via so called chat proxy objects. Each addon can create their own proxy and call the Print and Printf method (similar to d() and df()).

Addon Tag
The library will automatically prefix each message with a tag provided to each chat proxy instance by their addon. Users can choose if they want the tag to be the full addon name or a shortened string.

Time Prefix
The library can also print the current time in front of each chat message. This is disabled by default to avoid compatibility issues with other chat addons, but can be enabled via the settings explained below.

Chat History
Another feature of the library is to store all incoming chat messages and restore them again at UI load. This is also disabled by default to avoid compatibility problems (especially with pChat). Unlike with pChat the history is saved in raw form, meaning that any modifications to the message made by addons are not stored and instead applied when the messages are restored. This also means that information like the guild name is lost when the player leaves a guild and can lead to restored messages showing no or even a different guild name.

Quick Start
Add LibChatMessage as a dependency to your addon manifest:
Code:
## DependsOn: LibChatMessage
Afterwards you can create a chat proxy and print messages like so:
Lua Code:
  1. local chat = LibChatMessage("MyAddon", "MA") -- long and short tag to identify who is printing the message
  2. chat:Print("Simple message") -- instead of d()
  3. chat:Printf("Formatted %s", "message") -- instead of df()
  4. chat:SetTagColor("ff0000"):Print("Message with a different tag color") -- To change the tag color for e.g. warnings. The message itself can be colored with a color tag, although I can't really recommend doing that
  5. chat:SetEnabled(false) -- in case the output of this ChatProxy should be enabled. Could be used when a settings is supposed to disable chat messages for an addon
  6. chat:Print("Ignored message") -- won't show up

Settings
LibChatMessage offers several settings to allow players to control the look of the output. The settings can be changed via the "/chatmessage" slash command, or via the libraries API. Using the slash command with an invalid command will print the following message to chat:
Code:
/chatmessage <command> [argument]
<time>      [on/off]           Enables or disables the time prefix
<chat>      [on/off]           Controls the time prefix on regular chat
<format>    [auto/12h/24h]     Changes the used time format
<tag>       [off/short/long]   Changes the length of the used tag
<history>   [on/off]           Restore old chat after login
<age>       [seconds]          The maximum age of restored chat
Example: /chatmessage tag short
Using a command without an argument will print the current state of the setting to chat.

API Reference

Create
Returns a new instance of ChatProxy with the given tags.
Code:
local chat = LibChatMessage.Create(longTag, shortTag)
or
Code:
local chat = LibChatMessage(longTag, shortTag)
ChatProxy:SetTagColor
Sets the color of the message tag for the next printed message (resets afterwards). Can be either a hex string ("ff0000") or a ZO_ColorDef object. Returns the ChatProxy instance so the call can be chained as shown in the quick start example.
Code:
local chat = chat:SetTagColor(color)
ChatProxy:Print
Method to a print regular messages to chat. The message will automatically be prefixed with the time and tag based on user preferences.
Code:
chat:Print(message)
ChatProxy:Printf
Method to print a message formatted via string.format to chat. The message will automatically be prefixed with the time and tag based on user preferences.
Code:
chat:Printf(formatString, ...)
ChatProxy:SetEnabled
Setter to turn this proxy off, so it no longer prints anything to chat when one of its methods is called. Can be used to easily enable or disable chat messages for an addon based on user preferences.
Code:
chat:SetEnabled(enabled)
ClearChat
Removes all messages from all chat windows.
Code:
LibChatMessage:ClearChat()
ClearHistory
Removes all stored messages from the chat history.
Code:
LibChatMessage:ClearHistory()
GetHistory
Returns the current chat history table.
Code:
LibChatMessage:GetHistory()
SetTimePrefixEnabled
Sets the time prefix feature enabled or disabled. Disabled by default as it may cause problems with other chat addons that have similar features.
Code:
LibChatMessage:SetTimePrefixEnabled(enabled)
IsTimePrefixEnabled
Returns true if the time prefix feature is enabled.
Code:
local enabled = LibChatMessage:IsTimePrefixEnabled()
SetRegularChatMessageTimePrefixEnabled
Sets the time prefix feature for player chat channels enabled or disabled. Enabled by default, but only counts if the time prefix feature itself is turned on.
Code:
LibChatMessage:SetTimePrefixEnabled(enabled)
IsRegularChatMessageTimePrefixEnabled
Returns true if the time prefix feature is enabled for player chat channels.
Code:
local enabled = LibChatMessage:IsTimePrefixEnabled()
TIME_FORMATS
An array containing the time formats passed to os.date for the time prefix.
  1. TIME_FORMAT_AUTO = "[%X]" - uses locale dependent formatting
  2. TIME_FORMAT_12 = "[%I:%M:%S %p]" - 12h time format
  3. TIME_FORMAT_24 = "[%T]" - 24h time format (ISO 8601)

SetTimePrefixFormat
Sets the format for the time prefix feature. Can be either one contained in TIME_FORMATS, or a custom format string. Custom strings should be wrapped in brackets.
Code:
LibChatMessage:SetTimePrefixFormat(format)
GetTimePrefixFormat
Returns the time prefix formatting string.
Code:
local format = LibChatMessage:GetTimePrefixFormat()
SetTagPrefixMode
Sets the mode used for the proxy tag for addon messages.
Available modes are:
  1. TAG_PREFIX_OFF - Disables showing a tag. The long tag will still be stored in the history in case it is enabled.
  2. TAG_PREFIX_LONG - Prints the long tag provided by an addon in front of the message
  3. TAG_PREFIX_SHORT - Prints the short tag provided by an addon in front of the message
Code:
LibChatMessage:SetTagPrefixMode(mode)
GetTagPrefixMode
Returns the current message tag mode.
Code:
local mode = LibChatMessage:GetTagPrefixMode()
SetChatHistoryEnabled
Sets the chat history feature enabled or disabled on the next UI load. This feature is not compatible with pChat and disabled by default.
Code:
LibChatMessage:SetChatHistoryEnabled(enabled)
IsChatHistoryEnabled
Returns true if the message history will be enabled on the next UI load.
Code:
local enabled = LibChatMessage:IsChatHistoryEnabled()
IsChatHistoryActive
Returns true if the message history is active right now.
Code:
local enabled = LibChatMessage:IsChatHistoryActive()
SetChatHistoryMaxAge
Sets the maximum age for chat messages to be restored on UI load in seconds. Default is 3600s (= 1h).
Code:
LibChatMessage:SetChatHistoryMaxAge(maxAge)
GetChatHistoryMaxAge
Returns the maximum age for chat messages in the history.
Code:
local maxAge = LibChatMessage:GetChatHistoryMaxAge()
v1.1.3
- fixed error when events are received before saved variables are loaded

v1.1.2
- updated for chat system changes in game version 5.3.5 (temporary workaround has been removed)

v1.1.1
- fixed error when an addon tries to print a message during initialization

v1.1.0
- added temporary workaround for chat formatters not working. See description for details.
- updated for Harrowstorm

v1.0.1
- added missing IsLibrary flag
Archived Files (5)
File Name
Version
Size
Uploader
Date
1.1.2
5kB
sirinsidiator
03/02/20 12:10 PM
1.1.1
6kB
sirinsidiator
02/25/20 01:55 PM
1.1.0
6kB
sirinsidiator
02/24/20 02:43 AM
1.0.1
5kB
sirinsidiator
06/01/19 05:15 AM
1.0.0
5kB
sirinsidiator
05/28/19 09:18 AM


Post A Reply Comment Options
Unread 03/05/20, 12:45 AM  
BornDownUnder
AddOn Author - Click to view AddOns

Forum posts: 59
File comments: 195
Uploads: 1
Thumbs up Re: Re: Error when library independently loaded.

Originally Posted by sirinsidiator
Originally Posted by BornDownUnder
I have just started with LibChatMessage, at present it is independent (No addon having need for the library)
Caught a bug, not sure what to make of it (My lua knowledge is very basic at present):

Code:
user:/AddOns/LibChatMessage/LibChatMessage.lua:528: function expected instead of nil
stack traceback:
user:/AddOns/LibChatMessage/LibChatMessage.lua:528: in function 'ReinitializeChatFormatters'
<Locals> noop = user:/AddOns/LibChatMessage/LibChatMessage.lua:518, originalRegisterForEvent = [C]:-1, eventId = 131200, eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:96 </Locals>
user:/AddOns/LibChatMessage/LibChatMessage.lua:586: in function 'func'
EsoUI/Libraries/Globals/globalapi.lua:207: in function '(anonymous)'
I hope it helps you in further updating after this patch cycle.
The function ReinitializeChatFormatters mentioned in the error has been removed in the latest version. You need to update your addons!
So many addons to update, sorry I missed yours! (It is standalone at present, none dependent upon it and you update really really quickly)
Report comment to moderator  
Reply With Quote
Unread 03/03/20, 02:29 PM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1340
File comments: 873
Uploads: 35
Re: Error when library independently loaded.

Originally Posted by BornDownUnder
I have just started with LibChatMessage, at present it is independent (No addon having need for the library)
Caught a bug, not sure what to make of it (My lua knowledge is very basic at present):

Code:
user:/AddOns/LibChatMessage/LibChatMessage.lua:528: function expected instead of nil
stack traceback:
user:/AddOns/LibChatMessage/LibChatMessage.lua:528: in function 'ReinitializeChatFormatters'
<Locals> noop = user:/AddOns/LibChatMessage/LibChatMessage.lua:518, originalRegisterForEvent = [C]:-1, eventId = 131200, eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:96 </Locals>
user:/AddOns/LibChatMessage/LibChatMessage.lua:586: in function 'func'
EsoUI/Libraries/Globals/globalapi.lua:207: in function '(anonymous)'
I hope it helps you in further updating after this patch cycle.
The function ReinitializeChatFormatters mentioned in the error has been removed in the latest version. You need to update your addons!
__________________
Like what I do? Support me on Patreon!
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 03/03/20, 02:16 PM  
BornDownUnder
AddOn Author - Click to view AddOns

Forum posts: 59
File comments: 195
Uploads: 1
Post Error when library independently loaded.

I have just started with LibChatMessage, at present it is independent (No addon having need for the library)
Caught a bug, not sure what to make of it (My lua knowledge is very basic at present):

Code:
user:/AddOns/LibChatMessage/LibChatMessage.lua:528: function expected instead of nil
stack traceback:
user:/AddOns/LibChatMessage/LibChatMessage.lua:528: in function 'ReinitializeChatFormatters'
<Locals> noop = user:/AddOns/LibChatMessage/LibChatMessage.lua:518, originalRegisterForEvent = [C]:-1, eventId = 131200, eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:96 </Locals>
user:/AddOns/LibChatMessage/LibChatMessage.lua:586: in function 'func'
EsoUI/Libraries/Globals/globalapi.lua:207: in function '(anonymous)'
I hope it helps you in further updating after this patch cycle.
Report comment to moderator  
Reply With Quote
Unread 03/03/20, 06:24 AM  
Caniblast

Forum posts: 1
File comments: 3
Uploads: 0
Big thanks for your quick fix on this lib.
Report comment to moderator  
Reply With Quote
Unread 03/03/20, 02:48 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1340
File comments: 873
Uploads: 35
Originally Posted by Akopian Atrebates
It is a testament to the importance of your library that so many other addons had problems when ZoS made this unexpected change. Thanks for your hard work.

Here is my version of the error if that helps:

user:/AddOns/LibChatMessage/LibChatMessage.lua:159: function expected instead of nil
stack traceback:
user:/AddOns/LibChatMessage/LibChatMessage.lua:159: in function '(anonymous)'
[C]: in function 'pcall'
user:/AddOns/LibChatMessage/LibChatMessage.lua:158: in function 'SafeAddEventFormatter'
|caaaaaa<Locals> eventId = "LibChatMessage", eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:165 </Locals>|r
user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)'
|caaaaaa<Locals> LIB_IDENTIFIER
stack traceback:
[C]: in function 'assert'
user:/AddOns/LibChatMessage/LibChatMessage.lua:162: in function 'SafeAddEventFormatter'
<Locals> eventId = "LibChatMessage", eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:165, success = F, err = "user:/AddOns/LibChatMessage/Li..." </Locals>|r
user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)'
|caaaaaa<Locals> LIB_IDENTIFIER = "LibChatMessage", lib = [table:1]{chatHistoryActive = T}, TAG_FORMAT = "[%s]", COLOR_FORMAT = "|c%s%s|r", MESSAGE_TEMPLATE = "%s %s", SYSTEM_TAG = "[System]", TIME_FORMAT_AUTO = "[%X]", TIME_FORMAT_12 = "[%I:%M:%S %p]", TIME_FORMAT_24 = "[%T]", TIME_FORMATS = [table:2]{1 = "[%X]"}, TIME_FORMAT_MAPPING = [table:3]{12h = "[%I:%M:%S %p]", auto = "[%X]", 24h = "[%T]"}, REVERSE_TIME_FORMAT_MAPPING = [table:4]{[%X] = "auto", [%I:%M:%S %p] = "12h", [%T] = "24h"}, TAG_PREFIX_OFF = 1, TAG_PREFIX_LONG = 2, TAG_PREFIX_SHORT = 3, TIMESTAMP_INDEX = 1, MAX_HISTORY_LENGTH = 10000, TRIMMED_HISTORY_LENGTH = 9000, strlower = [C]:-1, tconcat = [C]:-1 </Locals>|r
Your error message indicates you haven't updated your addons.
__________________
Like what I do? Support me on Patreon!
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 03/02/20, 05:35 PM  
Akopian Atrebates

Forum posts: 3
File comments: 150
Uploads: 0
It is a testament to the importance of your library that so many other addons had problems when ZoS made this unexpected change. Thanks for your hard work.

Here is my version of the error if that helps:

user:/AddOns/LibChatMessage/LibChatMessage.lua:159: function expected instead of nil
stack traceback:
user:/AddOns/LibChatMessage/LibChatMessage.lua:159: in function '(anonymous)'
[C]: in function 'pcall'
user:/AddOns/LibChatMessage/LibChatMessage.lua:158: in function 'SafeAddEventFormatter'
|caaaaaa<Locals> eventId = "LibChatMessage", eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:165 </Locals>|r
user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)'
|caaaaaa<Locals> LIB_IDENTIFIER
stack traceback:
[C]: in function 'assert'
user:/AddOns/LibChatMessage/LibChatMessage.lua:162: in function 'SafeAddEventFormatter'
<Locals> eventId = "LibChatMessage", eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:165, success = F, err = "user:/AddOns/LibChatMessage/Li..." </Locals>|r
user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)'
|caaaaaa<Locals> LIB_IDENTIFIER = "LibChatMessage", lib = [table:1]{chatHistoryActive = T}, TAG_FORMAT = "[%s]", COLOR_FORMAT = "|c%s%s|r", MESSAGE_TEMPLATE = "%s %s", SYSTEM_TAG = "[System]", TIME_FORMAT_AUTO = "[%X]", TIME_FORMAT_12 = "[%I:%M:%S %p]", TIME_FORMAT_24 = "[%T]", TIME_FORMATS = [table:2]{1 = "[%X]"}, TIME_FORMAT_MAPPING = [table:3]{12h = "[%I:%M:%S %p]", auto = "[%X]", 24h = "[%T]"}, REVERSE_TIME_FORMAT_MAPPING = [table:4]{[%X] = "auto", [%I:%M:%S %p] = "12h", [%T] = "24h"}, TAG_PREFIX_OFF = 1, TAG_PREFIX_LONG = 2, TAG_PREFIX_SHORT = 3, TIMESTAMP_INDEX = 1, MAX_HISTORY_LENGTH = 10000, TRIMMED_HISTORY_LENGTH = 9000, strlower = [C]:-1, tconcat = [C]:-1 </Locals>|r
Last edited by Akopian Atrebates : 03/02/20 at 05:37 PM.
Report comment to moderator  
Reply With Quote
Unread 03/02/20, 01:28 PM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1340
File comments: 873
Uploads: 35
Originally Posted by sirinsidiator
Originally Posted by tamedbeast
Still getting an error after update

Lua Code:
  1. user:/AddOns/LibChatMessage/LibChatMessage.lua:107: attempt to index a nil value
  2. stack traceback:
  3. user:/AddOns/LibChatMessage/LibChatMessage.lua:107: in function '(anonymous)'
  4. |caaaaaa<Locals> formattedEventText = "|H1:character:Golzarga Ubeshka...", fromDisplayName = "@drArsMoriendi", rawMessageText = "I'm levelling a stamdk right n...", timeStamp = 1583175537 </Locals>|r
  5. (tail call): ?
  6. EsoUI/Ingame/ChatSystem/ChatHandlers.lua:247: in function 'ZO_ChatRouter:FormatAndAddChatMessage'
  7. |caaaaaa<Locals> self = [table:1]{fireCallbackDepth = 0}, eventKey = 131103, eventCategory = 6, messageFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:95 </Locals>|r
  8. EsoUI/Ingame/ChatSystem/ChatHandlers.lua:212: in function 'OnChatEvent'
  9. |caaaaaa<Locals> eventCode = 131103 </Locals>|r

EDIT: The error seems to have fixed itself with a hard game reset rather than a reload.
Thanks. They have seemingly made a "hidden" change and chat message events can now occur before the library is fully initialized. Will upload a fix soon.
And it should be fixed in 1.1.3. Let me know if you still encounter any errors.
__________________
Like what I do? Support me on Patreon!
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 03/02/20, 01:12 PM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1340
File comments: 873
Uploads: 35
Originally Posted by tamedbeast
Still getting an error after update

Lua Code:
  1. user:/AddOns/LibChatMessage/LibChatMessage.lua:107: attempt to index a nil value
  2. stack traceback:
  3. user:/AddOns/LibChatMessage/LibChatMessage.lua:107: in function '(anonymous)'
  4. |caaaaaa<Locals> formattedEventText = "|H1:character:Golzarga Ubeshka...", fromDisplayName = "@drArsMoriendi", rawMessageText = "I'm levelling a stamdk right n...", timeStamp = 1583175537 </Locals>|r
  5. (tail call): ?
  6. EsoUI/Ingame/ChatSystem/ChatHandlers.lua:247: in function 'ZO_ChatRouter:FormatAndAddChatMessage'
  7. |caaaaaa<Locals> self = [table:1]{fireCallbackDepth = 0}, eventKey = 131103, eventCategory = 6, messageFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:95 </Locals>|r
  8. EsoUI/Ingame/ChatSystem/ChatHandlers.lua:212: in function 'OnChatEvent'
  9. |caaaaaa<Locals> eventCode = 131103 </Locals>|r

EDIT: The error seems to have fixed itself with a hard game reset rather than a reload.
Thanks. They have seemingly made a "hidden" change and chat message events can now occur before the library is fully initialized. Will upload a fix soon.
__________________
Like what I do? Support me on Patreon!
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 03/02/20, 01:01 PM  
tamedbeast

Forum posts: 2
File comments: 5
Uploads: 0
Still getting an error after update

Lua Code:
  1. user:/AddOns/LibChatMessage/LibChatMessage.lua:107: attempt to index a nil value
  2. stack traceback:
  3. user:/AddOns/LibChatMessage/LibChatMessage.lua:107: in function '(anonymous)'
  4. |caaaaaa<Locals> formattedEventText = "|H1:character:Golzarga Ubeshka...", fromDisplayName = "@drArsMoriendi", rawMessageText = "I'm levelling a stamdk right n...", timeStamp = 1583175537 </Locals>|r
  5. (tail call): ?
  6. EsoUI/Ingame/ChatSystem/ChatHandlers.lua:247: in function 'ZO_ChatRouter:FormatAndAddChatMessage'
  7. |caaaaaa<Locals> self = [table:1]{fireCallbackDepth = 0}, eventKey = 131103, eventCategory = 6, messageFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:95 </Locals>|r
  8. EsoUI/Ingame/ChatSystem/ChatHandlers.lua:212: in function 'OnChatEvent'
  9. |caaaaaa<Locals> eventCode = 131103 </Locals>|r

EDIT: The error seems to have fixed itself with a hard game reset rather than a reload.
Last edited by tamedbeast : 03/02/20 at 01:07 PM.
Report comment to moderator  
Reply With Quote
Unread 03/02/20, 12:46 PM  
Pyr0xyrecuprotite

Forum posts: 1
File comments: 47
Uploads: 0
March 2 update - LibChat lua messages fixed now

Originally Posted by sirinsidiator
I've just uploaded a new version which should work with today's game update!
Thank you, this update fixed the issues for me, much appreciated!
Report comment to moderator  
Reply With Quote
Unread 03/02/20, 12:13 PM  
ZoomStop
 
ZoomStop's Avatar

Forum posts: 0
File comments: 1
Uploads: 0
Re: How to correct the bug !

Originally Posted by gdfou
Simply change all the calls of CHAT_ROUTER:AddEventFormatter by ZO_ChatSystem_AddEventHandler !
Because CHAT_ROUTER:AddEventFormatter is no longeur accessible
Good game !
Thank you this worked great. To clarify for folks who may have trouble, you edit Documents\Elder Scrolls Online\live\AddOns\LibChatMessage\LibChatMessage.lua and replace all 3 occurances of "CHAT_ROUTER:AddEventFormatter" with "ZO_ChatSystem_AddEventHandler".
Report comment to moderator  
Reply With Quote
Unread 03/02/20, 12:12 PM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1340
File comments: 873
Uploads: 35
I've just uploaded a new version which should work with today's game update!
__________________
Like what I do? Support me on Patreon!
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 03/02/20, 12:03 PM  
gdfou

Forum posts: 1
File comments: 4
Uploads: 0
How to correct the bug !

Simply change all the calls of CHAT_ROUTER:AddEventFormatter by ZO_ChatSystem_AddEventHandler !
Because CHAT_ROUTER:AddEventFormatter is no longeur accessible
Good game !
Report comment to moderator  
Reply With Quote
Unread 03/02/20, 11:58 AM  
Elijafire

Forum posts: 2
File comments: 45
Uploads: 0
Same error message here took me forever to find it

Originally Posted by Targets
Fix pls

user:/AddOns/LibChatMessage/LibChatMessage.lua:159: function expected instead of nil
stack traceback:
user:/AddOns/LibChatMessage/LibChatMessage.lua:159: in function '(anonymous)'
[C]: in function 'pcall'
user:/AddOns/LibChatMessage/LibChatMessage.lua:158: in function 'SafeAddEventFormatter'
<Locals> eventId = "LibChatMessage", eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:165 </Locals>
user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)'
<Locals> LIB_IDENTIFIER
stack traceback:
[C]: in function 'assert'
user:/AddOns/LibChatMessage/LibChatMessage.lua:162: in function 'SafeAddEventFormatter'
<Locals> eventId = "LibChatMessage", eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:165, success = F, err = "user:/AddOns/LibChatMessage/Li..." </Locals>
user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)'
<Locals> LIB_IDENTIFIER = "LibChatMessage", lib = [table:1]{chatHistoryActive = T}, TAG_FORMAT = "[%s]", COLOR_FORMAT = "|c%s%s|r", MESSAGE_TEMPLATE = "%s %s", SYSTEM_TAG = "[System]", TIME_FORMAT_AUTO = "[%X]", TIME_FORMAT_12 = "[%I:%M:%S %p]", TIME_FORMAT_24 = "[%T]", TIME_FORMATS = [table:2]{1 = "[%X]"}, TIME_FORMAT_MAPPING = [table:3]{auto = "[%X]", 24h = "[%T]", 12h = "[%I:%M:%S %p]"}, REVERSE_TIME_FORMAT_MAPPING = [table:4]{[%X] = "auto", [%I:%M:%S %p] = "12h", [%T] = "24h"}, TAG_PREFIX_OFF = 1, TAG_PREFIX_LONG = 2, TAG_PREFIX_SHORT = 3, TIMESTAMP_INDEX = 1, MAX_HISTORY_LENGTH = 10000, TRIMMED_HISTORY_LENGTH = 9000, strlower = [C]:-1, tconcat = [C]:-1 </Locals>

user:/AddOns/LibChatMessage/LibChatMessage.lua:108: attempt to index a nil value
stack traceback:
user:/AddOns/LibChatMessage/LibChatMessage.lua:108: in function '(anonymous)'
<Locals> formattedEventText = "|H1:channel:Late Night Dungeon...", fromDisplayName = "@Skysenzz", rawMessageText = "no", timeStamp = 1583169947 </Locals>
(tail call): ?
EsoUI/Ingame/ChatSystem/ChatHandlers.lua:247: in function 'ZO_ChatRouter:FormatAndAddChatMessage'
<Locals> self = [table:1]{fireCallbackDepth = 0}, eventKey = 131103, eventCategory = 10, messageFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:96 </Locals>
EsoUI/Ingame/ChatSystem/ChatHandlers.lua:212: in function 'OnChatEvent'
<Locals> eventCode = 131103 </Locals>

user:/AddOns/LibChatMessage/LibChatMessage.lua:81: attempt to index a nil value
stack traceback:
user:/AddOns/LibChatMessage/LibChatMessage.lua:81: in function 'ApplyTimeAndTagPrefix'
<Locals> formattedEventText = "|H1:display:ToxicHannerup|h[@T...", fromDisplayName = "@ToxicHannerup", timeStamp = 1583169947 </Locals>
(tail call): ?
EsoUI/Ingame/ChatSystem/ChatHandlers.lua:247: in function 'ZO_ChatRouter:FormatAndAddChatMessage'
<Locals> self = [table:1]{fireCallbackDepth = 0}, eventKey = 327683, eventCategory = 9, messageFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:96 </Locals>
EsoUI/Ingame/ChatSystem/ChatHandlers.lua:212: in function 'OnChatEvent'
<Locals> eventCode = 327683 </Locals>
Report comment to moderator  
Reply With Quote
Unread 03/02/20, 11:58 AM  
Marcus

Forum posts: 4
File comments: 13
Uploads: 0
Known Issue

Originally Posted by sirinsidiator
ZOS has made some additional changes to the chat system today. I'll upload a new version later which will fix this error.
Just a note at the top so everyone knows, sirinsidiator is aware of the issue and working on a fix.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.