1. #1

    Weak Aura's Lua Errors - Timer / Countdown related

    Hey all, and whoever responds, thanks in advance for reading / responding!

    So I've got an issue with what I assume is Weak Auras' related.. On my Weak Auras I run a custom script to display whole seconds until x variable time left and it changes to X.X time remaining, showing the tenth's along with the current second.


    http://pastebin.com/3Z67CVyW

    function(expT,dur,timer)
    if not timer then return "" end
    local timer = tonumber(timer)

    if timer > 4 then
    return format("%.0f",timer)
    else
    return format("%.1f",timer)
    end
    end
    I did not make this, a while back ago, I got this from someone, and assumed it worked properly all this time, but I've always noticed, my timers and auras bug out and freak out (I had just assumed this was a conflict with another addon) but I had shared my WA's with another rogue, and he said he was getting lua errors (I have something that blocks Lua errors, so I was unaware of this error occurring). He went ahead and shared the error with me, and I'm pretty sure its related to the custom text I have set. I was wondering if there is some way to fix the issue that is occurring, because it does not let my multi-dot weak aura's to work properly.

    http://pastebin.com/5FW0zFnh

    Message: [string "return function(expT,dur,timer)..."]:5: attempt to compare number with nil
    Time: 12/18/14 21:54:23
    Count: 81
    Stack: [string "return function(expT,dur,timer)..."]:5: in function <[string "return function(expT,dur,timer)..."]:1>
    Interface\AddOns\WeakAuras\RegionTypes\icon.lua:215: in function `UpdateCustomText'
    Interface\AddOns\WeakAuras\WeakAuras.lua:5042: in function <Interface\AddOns\WeakAuras\WeakAuras.lua:5038>

    Locals: expT = 138612.578
    dur = 24
    timer = " "
    timer = nil
    (*temporary) = " "
    (*temporary) = nil
    (*temporary) = nil
    (*temporary) = "attempt to compare number with nil"

    Next, he said another lua error popped up along side this one (but I don't necessarily think its related to this issue) but I wanted to post it just incase if there was something that I was missing based on what I can understand from the Lua errors.

    http://pastebin.com/ucsieZM3

    Message: Interface\AddOns\DBM-Core\DBM-Core.lua:5666: attempt to compare number with nil
    Time: 12/18/14 19:00:16
    Count: 1
    Stack: Interface\AddOns\DBM-Core\DBM-Core.lua:5666: in function `CheckNearby'
    Interface\AddOns\DBM-Highmaul\Margok.lua:350: in function `handler'
    Interface\AddOns\DBM-Core\DBM-Core.lua:506: in function <Interface\AddOns\DBM-Core\DBM-Core.lua:493>
    (tail call): ?
    Interface\AddOns\DBM-Core\DBM-Core.lua:506: in function <Interface\AddOns\DBM-Core\DBM-Core.lua:493>

    Locals: self = <table> {
    stats = <table> {
    }
    SPELL_AURA_REMOVED = <function> defined @Interface\AddOns\DBM-Highmaul\Margok.lua:390
    SyncThreshold = 8
    ignoreBestkill = false
    hasMythic = true
    modId = "DBM-Highmaul"
    revision = 11971
    creatureId = 77428
    iconRestore = <table> {
    }
    OnCombatStart = <function> defined @Interface\AddOns\DBM-Highmaul\Margok.lua:166
    encounterId = 1705
    localization = <table> {
    }
    announces = <table> {
    }
    optionCategories = <table> {
    }
    SPELL_CAST_START = <function> defined @Interface\AddOns\DBM-Highmaul\Margok.lua:189
    specwarns = <table> {
    }
    OnCombatEnd = <function> defined @Interface\AddOns\DBM-Highmaul\Margok.lua:183
    inCombatOnlyEventsRegistered = 1
    numSounds = 3
    lastWipeTime = 127341.648
    inCombat = true
    registeredUnitEvents = <table> {
    }
    noHeroic = false
    hasChallenge = false
    hasLFR = false
    oneFormat = false
    type = "RAID"
    UNIT_SPELLCAST_SUCCEEDED = <function> defined @Interface\AddOns\DBM-Highmaul\Margok.lua:412
    zones = <table> {
    }
    combatInfo = <table> {
    }
    Options = <table> {
    }
    timers = <table> {
    }
    addon = <table> {
    }
    categorySort = <table> {
    }
    instanceId = 477
    countdowns = <table> {
    }
    modelId = 54329
    SPELL_AURA_APPLIED = <function> defined @Interface\AddOns\DBM-Highmaul\Margok.lua:307
    SPELL_CAST_SUCCESS = <function> defined @Interface\AddOns\DBM-Highmaul\Margok.lua:295
    id = "1197"
    usedIcons = <table> {
    }
    DefaultOptions = <table> {
    }
    vb = <table> {
    }
    inCombatOnlyEvents = <table> {
    }
    }
    range = nil
    targetname = "Tisugerus-Sargeras"
    uId = "raid9"
    inRange = 2.8633425447115
    (*temporary) = "player"
    (*temporary) = 3910.9001464844
    (*temporary) = 8592
    (*temporary) = "attempt to compare number with nil"
    DBM = <table> {
    MoveSpecialWarning = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:7065
    StopLogging = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:4635
    GetModByName = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:5327
    CHAT_MSG_MONSTER_EMOTE = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:3927
    CHAT_MSG_WHISPER = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:4967
    UPDATE_SHAPESHIFT_FORM = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:2421
    ShowUpdateReminder = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:3698
    PLAYER_REGEN_DISABLED = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:3762
    CreateModLocalization = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:8291
    IsEnabled = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:5064
    CHALLENGE_MODE_END = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:2587
    Capitalize = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:5153
    ADDON_LOADED = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:906
    BossHealth = <table> {
    }
    ShowRaidIDRequestResults = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:3468
    INSTANCE_GROUP_SIZE_CHANGED = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:2106
    GetBossUnitId = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:2243
    ToggleRaidBossEmoteFrame = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:5030
    UPDATE_MOUSEOVER_UNIT = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:2815
    InfoFrame = <table> {
    }
    FilterRaidBossEmote = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:811
    RequestTimers = <function> defined @Interface\AddOns\DBM-Core\DBM-Core.lua:4719
    ForceUpdate = <function> defined @

  2. #2
    Ok, what you're saying makes some sense to me. I apologize, I don't know Lua, and actually am learning it this coming semester, so I will be able to do it myself eventually, instead of always asking for help. But if you do have the time, would you mind fixing the calling.

    I'd imaging to 'fix' it, you just need to change what timer = nil is, to properly 'match' the data with timer = " " (this is what I am getting from what you said). Yet I really wouldn't know what that would be at this time..

    Thanks again for the quick response.5

  3. #3
    Deleted
    It should work like this:

    function(expT,dur,timer)
    if timer == nil then
    return ""
    end
    local timer = tonumber(timer)

    if timer > 4 then
    return format("%.0f",timer)
    else
    return format("%.1f",timer)
    end
    end

  4. #4
    When I read it, it seems like what you put is still trying to compare nil to a number yes? I'm not sure, but I tried it anyways and I'm still getting an error. :/

    Code:
    Message: [string "return function(expT,dur,timer)..."]:7: attempt to compare number with nil
    Time: 12/18/14 17:26:58
    Count: 50
    Stack: [C]: ?
    [string "return function(expT,dur,timer)..."]:7: in function <[string "return function(expT,dur,timer)..."]:1>
    Interface\AddOns\WeakAuras\RegionTypes\icon.lua:215: in function `UpdateCustomText'
    Interface\AddOns\WeakAuras\WeakAuras.lua:5042: in function <Interface\AddOns\WeakAuras\WeakAuras.lua:5038>
    
    Locals:

Posting Permissions

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