View Bug Report
Bad argument #1
Bug #: 2491
File: pChat
Date: 08/25/19 11:29 AM
By: cybele7
Status: Unconfirmed
Thank you for your continued work on this addon and others! I have been getting this error on about half my toons. The error happens with both reloadui commands as well as on first login. It appears to me that this is caused by the restore chat functions so I am turning them off for now. I am using the sync settings but that appears to not be syncing chat with the character I select. Actually, I can confirm the error is definitely in the restore chat settings. (I don't know anything about code but I like using your addon.)

bad argument #1 to 'string.gsub' (string expected, got nil)
stack traceback:
[C]: in function 'string.gsub'
user:/AddOns/pChat/pChat.lua.2888: in function 'AddLinkHandler'
<Locals> chanCode = 11, numLine = 185, formattedText = ""</Locals>
user:/AddOns/pChat/pChat.lua:2971: in function 'RestoreChatMessagesFromHistory'
<Locals> wasReloadUI = true, lastInsertionWas = 1566750895, historyIndex = 185, categories = tbl, channelToRestore = 11, category = 9, containerIndex = 1, tabIndex = 1 </Locals>
user:/AddOns/pChat/pChat.lua:3052: in function 'RestoreChatHistory'
user:/AddOns/pChat/pChat.lua:6085: in function 'OnPlayerActivated'