SavedInstances

SavedInstances

13M Downloads

lua error sometimes on login

coani opened this issue ยท 5 comments

commented

Got this once yesterday when logging in, and today too:

1x SavedInstances\SavedInstances-r552.lua:2909: attempt to compare number with nil
SavedInstances\SavedInstances-r552.lua:2909: in function ?' ...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-6.lua:145: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:145> [string "safecall Dispatcher[1]"]:4: in function <[string "safecall Dispatcher[1]"]:4> [C]: ? [string "safecall Dispatcher[1]"]:13: in function ?'
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-6.lua:90: in function `Fire'
Ace3\AceEvent-3.0\AceEvent-3.0-3.lua:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>

Locals:
nil

commented

Have you noticed whether this only occurs if you have no Emissary quests or all perhaps all 12 available?

commented

Hmm didn't pay attention to the Emissary quest status tbh, but on thinking about it, it is occuring when I was logging in in the afternoon after coming home from work (so I guess it might be related to checking some status after daily reset).
Honestly don't recall if it happened today or yesterday though, had something else on my mind.

commented

Got the error again today when I first logged on alt, then again on main. It happened on login when the char appeared in the world. The alt had just 1 emissary up (suramar quests), the main had 2 (2/3 kirin tor from yesterday + the new 0/4 nightfallen today).

commented

Pretty sure if you validate that timeleft is not nil it should insulate against this issue. This is just an educated guess from other addons that had similar issues, not sure though.

I think something like this would work (bolded is what I modified)?

  **if timeleft and (timeleft > 2880) then**
    t.DailyWorldQuest.days2 = {}
    t.DailyWorldQuest.days2.name = title
    t.DailyWorldQuest.days2.dayleft = 2
    t.DailyWorldQuest.days2.questneed = questNeed
    t.DailyWorldQuest.days2.questdone = questDone
  **elseif timeleft and (timeleft > 1440) then**
    t.DailyWorldQuest.days1 = {}
    t.DailyWorldQuest.days1.name = title
    t.DailyWorldQuest.days1.dayleft = 1
    t.DailyWorldQuest.days1.questneed = questNeed
    t.DailyWorldQuest.days1.questdone = questDone
commented

Should be fixed by 3892a09