Hello,
I am developing an addon that can read, take attachments, take money, and finally delete each piece of mail in your inbox with a single mouse-click on an xml frame. I am getting the following errors from the EsoUI, looking for some help here:
Code:
EsoUI/Ingame/Mail/MailInbox.lua:531: attempt to index a nil value
stack traceback:
EsoUI/Ingame/Mail/MailInbox.lua:531: in function 'MailInbox:RefreshMoneyControls'
EsoUI/Ingame/Mail/MailInbox.lua:562: in function 'MailInbox:OnTakeAttachedMoneySuccess'
EsoUI/Ingame/Mail/MailInbox.lua:51: in function '(anonymous)'
I am using a helper function to identify each mailId and store the "GetMailInfo" data into an array which is called in order to determine if each mail needs to be read, looted or deleted. That information is stored in tables for each category, and event handlers keep the flow running when a mail is read, looted or deleted.
The errors seem to be occurring after the first mail is deleted, as all other mails are read and looted. I've gotten this problem before with previous versions and multiple re-writes of the code to achieve the same end result. Looking for help from the community as I am a new developer and I am not sure how to troubleshoot errors coming from what seems to be the client's LUA functions.