ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   CombatCloud help (https://www.esoui.com/forums/showthread.php?t=10175)

Mr.Envy 05/11/22 05:04 PM

CombatCloud help
 
Hi guys, so, I'm using CombatCloud to show the dmg I am dealing above my reticle, I really like the way it looks/works, the only problem is that it is a bit outdated and the author no longer supports it, I'd like help in solving a LUA error that keeps popping up in an abusive way, for example, after completing a dungeon I have like 40+ notifications regarding this LUA error:

bad argument #1 to 'unpack' (table/struct expected, got nil)
stack traceback:
[C]: in function 'unpack'
user:/AddOns/CombatCloud/Core/EventViewers/_Base.lua:173: in function 'CombatCloud_EventViewer:PrepareLabel'
user:/AddOns/CombatCloud/Core/EventViewers/Combat_Hybrid.lua:58: in function 'CombatCloud_CombatHybridEventViewer:View'
user:/AddOns/CombatCloud/Core/EventViewers/Combat_Hybrid.lua:47: in function 'CombatCloud_CombatHybridEventViewer:ViewFromEventBuffer'
user:/AddOns/CombatCloud/Core/EventViewers/Combat_Hybrid.lua:34: in function 'func'
/EsoUI/Libraries/Globals/globalapi.lua:244: in function '(anonymous)'

It doesn't break my game or anything, CombatCloud works as intended, but spams the sh*t out of me with that error and it's becoming annoying. Anyone knows how I might make this disappear?

Baertram 05/12/22 04:28 AM

Edit the file /Core/EventViewers/_base.lua with a text editor
Add this line at line 173
if not color then return end

The function CombatCloud_EventViewer:PrepareLabel looks like this in the end
Lua Code:
  1. function CombatCloud_EventViewer:PrepareLabel(label, fontSize, color, text)
  2.     label:SetText(text)
  3.     if not color then return end
  4.     label:SetColor(unpack(color))
  5.     label:SetFont(format('%s|%d|%s', self.LMP:Fetch('font', CombatCloudSettings.fontFace), fontSize, CombatCloudSettings.fontOutline))
  6. end

Hope it fixes the spam, as the unpack function says it cannot use the table "color" properly as it is nil. So adding a check before should abort before the error occurs.

Mr.Envy 05/12/22 07:39 AM

It did fix my problem, just completed a dungeon just to test it out and not a single error popped up. Thanks a lot Baertram! If it is ok for you I would like to post this fix in the addons' comments section so others can use it, giving the credits to you, ofc. ^^ Thank you once again, I really appreciate your help, all the best.

Nevermind about posting, just noticed that you already did, awesome!

Baertram 05/12/22 09:50 AM

;)
You are welcome, glad it works


All times are GMT -6. The time now is 08:07 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI