1. #1
    Bloodsail Admiral melkesjokolade's Avatar
    10+ Year Old Account
    Join Date
    Dec 2012
    Location
    Norway
    Posts
    1,136

    Lua error message with LUI

    Hi, so I cant play the game anymore coz of the insane amount of Lua errors I get from LUI.

    Lua message :

    Message: \unitframes\plugins\oUF_CombatFeedback.lua:132: ERROR: <unnamed>:SetFont(): invalid fontHeight: 0, height must be > 0
    Time: 09/20/13 21:25:10
    Count: 3636
    Stack: [C]: ?
    [C]: in function `SetFont'
    ...AddOns\LUI\unitframes\plugins\oUF_CombatFeedback.lua:132: in function `?'
    Interface\AddOns\LUI\unitframes\core\events.lua:69: in function <Interface\AddOns\LUI\unitframes\core\events.lua:62>

    So, seems like I just have to change the font height to more than 0? But how.. I've found the unitframes\plugins map thing but there is so much text and i dont know how to find the height stuff nor what to change it to/how to write it.. I found some original height stuff and changed it to 1 but nothing has changed. Im noob when it comes to text..

    Heres the LUI-file :

    local _, ns = ...
    local oUF = ns.oUF or oUF

    if not oUF then return end

    local damage_format = "-%d"
    local heal_format = "+%d"
    local maxAlpha = 0.6
    local updateFrame
    local feedback = {}
    local originalHeight = 1
    local color
    local colors = {
    STANDARD = { 1, 1, 1 }, -- color for everything not in the list below
    -- damage colors
    IMMUNE = { 1, 1, 1 },
    DAMAGE = { 1, 0, 0 },
    CRUSHING = { 1, 0, 0 },
    CRITICAL = { 1, 0, 0 },
    GLANCING = { 1, 0, 0 },
    ABSORB = { 1, 1, 1 },
    BLOCK = { 1, 1, 1 },
    RESIST = { 1, 1, 1 },
    MISS = { 1, 1, 1 },
    -- heal colors
    HEAL = { 0, 1, 0 },
    CRITHEAL = { 0, 1, 0 },
    -- energize colors
    ENERGIZE = { 0.41, 0.8, 0.94 },
    CRITENERGIZE = { 0.41, 0.8, 0.94 },
    }

    local function createUpdateFrame()
    if updateFrame then return end
    updateFrame = CreateFrame("Frame")
    updateFrame:Hide()
    updateFrame:SetScript("OnUpdate", function()
    if next(feedback) == nil then
    updateFrame:Hide()
    return
    end
    for object, startTime in pairs(feedback) do
    local maxalpha = object.CombatFeedbackText.maxAlpha
    local elapsedTime = GetTime() - startTime
    if ( elapsedTime < COMBATFEEDBACK_FADEINTIME ) then
    local alpha = maxalpha*(elapsedTime / COMBATFEEDBACK_FADEINTIME)
    object.CombatFeedbackText:SetAlpha(alpha)
    elseif ( elapsedTime < (COMBATFEEDBACK_FADEINTIME + COMBATFEEDBACK_HOLDTIME) ) then
    object.CombatFeedbackText:SetAlpha(maxalpha)
    elseif ( elapsedTime < (COMBATFEEDBACK_FADEINTIME + COMBATFEEDBACK_HOLDTIME + COMBATFEEDBACK_FADEOUTTIME) ) then
    local alpha = maxalpha - maxalpha*((elapsedTime - COMBATFEEDBACK_HOLDTIME - COMBATFEEDBACK_FADEINTIME) / COMBATFEEDBACK_FADEOUTTIME)
    object.CombatFeedbackText:SetAlpha(alpha)
    else
    object.CombatFeedbackText:Hide()
    feedback[object] = nil
    end
    end
    end)
    end


    local function combat(self, event, unit, eventType, flags, amount, dtype)
    if unit ~= self.unit then return end
    local FeedbackText = self.CombatFeedbackText
    local fColors = FeedbackText.colors
    local font, fontHeight, fontFlags = FeedbackText:GetFont()
    fontHeight = FeedbackText.origHeight -- always start at original height
    local text, arg
    color = fColors and fColors.STANDARD or colors.STANDARD
    if eventType == "IMMUNE" and not FeedbackText.ignoreImmune then
    color = fColors and fColors.IMMUNE or colors.IMMUNE
    fontHeight = fontHeight * 0.75
    text = CombatFeedbackText[eventType]
    elseif eventType == "WOUND" and not FeedbackText.ignoreDamage then
    if amount ~= 0 then
    if flags == "CRITICAL" then
    color = fColors and fColors.CRITICAL or colors.CRITICAL
    fontHeight = fontHeight * 1.5
    elseif flags == "CRUSHING" then
    color = fColors and fColors.CRUSING or colors.CRUSHING
    fontHeight = fontHeight * 1.5
    elseif flags == "GLANCING" then
    color = fColors and fColors.GLANCING or colors.GLANCING
    fontHeight = fontHeight * 0.75
    else
    color = fColors and fColors.DAMAGE or colors.DAMAGE
    end
    text = damage_format
    arg = amount
    elseif flags == "ABSORB" then
    color = fColors and fColors.ABSORB or colors.ABSORB
    fontHeight = fontHeight * 0.75
    text = CombatFeedbackText["ABSORB"]
    elseif flags == "BLOCK" then
    color = fColors and fColors.BLOCK or colors.BLOCK
    fontHeight = fontHeight * 0.75
    text = CombatFeedbackText["BLOCK"]
    elseif flags == "RESIST" then
    color = fColors and fColors.RESIST or colors.RESIST
    fontHeight = fontHeight * 0.75
    text = CombatFeedbackText["RESIST"]
    else
    color = fColors and fColors.MISS or colors.MISS
    text = CombatFeedbackText["MISS"]
    end
    elseif eventType == "BLOCK" and not FeedbackText.ignoreDamage then
    color = fColors and fColors.BLOCK or colors.BLOCK
    fontHeight = fontHeight * 0.75
    text = CombatFeedbackText[eventType]
    elseif eventType == "HEAL" and not FeedbackText.ignoreHeal then
    text = heal_format
    arg = amount
    if flags == "CRITICAL" then
    color = fColors and fColors.CRITHEAL or colors.CRITHEAL
    fontHeight = fontHeight * 1.3
    else
    color = fColors and fColors.HEAL or colors.HEAL
    end
    elseif event == "ENERGIZE" and not FeedbackText.ignoreEnergize then
    text = amount
    if flags == "CRITICAL" then
    color = fColors and fColors.ENERGIZE or colors.ENERGIZE
    fontHeight = fontHeight * 1.3
    else
    color = fColors and fColors.CRITENERGIZE or colors.CRITENERGIZE
    end
    elseif not FeedbackText.ignoreOther then
    text = CombatFeedbackText[eventType]
    end

    if text then
    FeedbackText:SetFont(font,fontHeight,fontFlags)
    FeedbackText:SetFormattedText(text, arg)
    FeedbackText:SetTextColor(unpack(color))
    FeedbackText:SetAlpha(0)
    FeedbackText:Show()
    feedback[self] = GetTime()
    updateFrame:Show() -- start our onupdate
    end
    end

    local function addCombat(object)
    if not object.CombatFeedbackText then return end
    -- store the original starting height
    local font, fontHeight, fontFlags = object.CombatFeedbackText:GetFont()
    object.CombatFeedbackText.origHeight = fontHeight
    object.CombatFeedbackText.maxAlpha = object.CombatFeedbackText.maxAlpha or maxAlpha
    createUpdateFrame()
    object:RegisterEvent("UNIT_COMBAT", combat)
    end

    for k, object in ipairs(oUF.objects) do addCombat(object) end
    oUF:RegisterInitCallback(addCombat)


    So... where to write and what to change.. I need help cause everytime im in combat, error keeps spamming my screen and if i take lua error off, the fps drops to like 1-2 and is unplayable. I dont want a new interface addon and im n ot willing to play without it so dont even suggest it..
    Last edited by melkesjokolade; 2013-09-20 at 07:43 PM.

  2. #2
    uh no, if you're getting Lua errors like that it either needs to be fixed by the addon author or you're using a conflicting addon.

    do you have an addon that hides the damage/healing/dodge/miss/immune text on your player frame portrait? if not, should probably report the bug to LUI author.

  3. #3
    Deleted
    Do you have an addon to change your font, like Fonter?

  4. #4
    Bloodsail Admiral melkesjokolade's Avatar
    10+ Year Old Account
    Join Date
    Dec 2012
    Location
    Norway
    Posts
    1,136
    Quote Originally Posted by pnutbutter View Post
    uh no, if you're getting Lua errors like that it either needs to be fixed by the addon author or you're using a conflicting addon.

    do you have an addon that hides the damage/healing/dodge/miss/immune text on your player frame portrait? if not, should probably report the bug to LUI author.
    do you mean i should get an addon like that or if i had it i should turn it off?

    - - - Updated - - -

    This wasnt a problem before the patch btw. LUI rarely gets an update wich sucks :/

  5. #5
    I've tried to track this one down but as I'm not experiencing it it is proving very troublesome. The only thing I can suggest for now (as a work around) is to go into all the unit frame options and disable the Texts->Combat option. This will stop the heal/damage values showing on your unit frame but should also stop the errors.

    Are you able to post a list of addons you're using? If I can replicate that then I might be able to track down what's causing it.

    As for updates, release versions are a bit slow to come out, but alpha versions are more frequent and are stable enough to use (I've used LUI alphas for a very long time, and as I make the majority of the alpha changes at the moment I'm also using it in the live game).

  6. #6
    Quote Originally Posted by melkesjokolade View Post
    do you mean i should get an addon like that or if i had it i should turn it off?
    if you have one you should turn it off and see if the problem persists.
    This wasnt a problem before the patch btw. LUI rarely gets an update wich sucks :/
    that's not good

  7. #7
    Bloodsail Admiral melkesjokolade's Avatar
    10+ Year Old Account
    Join Date
    Dec 2012
    Location
    Norway
    Posts
    1,136
    Hmm now my problem is gone o.O my pala (wich is my main) is the one i play 95% of the time and is the one i noticed the problem with but i played my dk for a bit and i didnt have the problem and i noticed the dk didnt have the addon LUI_AddonsManager on so i disabled it on my pala and problems are gone wierd. Thanks for help though, all of you :>

  8. #8
    Interesting. I'll check if the other people having this issue also use LUI_AddonsManager.

    Unfortunately if that is the cause, then it's a 3rd party addon to LUI and isn't coded or supported by us. If that caused the errors then you'll need to take it up with them to get it fixed.

    [e] Actually, LUI Addons Manager shouldn't cause it. All that is is an addon control panel type addon to control which addons load. Do you have LUI Dynamics - because that does actually change LUI frames. I've installed both and will do some testing though.

    [e2] Installed both, could not replicate. Am waiting to hear if the others having this issue are using the 3rd party LUI addons though.
    Last edited by Mule; 2013-09-20 at 10:05 PM.

  9. #9
    I realize this is a six month old thread, but I actually figured out how to fix this today after spending about half an hour looking at the lua code, and haven't actually seen the fix posted anywhere else.

    All you have to do is go into LUI General > Settings, scroll down to Damage Font/Size, and modify the damage and crit text sizes (you can turn them down/up and back if you want), then relog with the command /rl.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •