LockedOut

LockedOut

104k Downloads

error with latest 1.5

Daeveren opened this issue ยท 10 comments

commented

the lua error shows up when I log first time
also the chat errors showed up only when i mouseovered the LO icon

2017-10-17 22_53_21-greenshot

ERROR 1
Message: Interface\AddOns\LockedOut\Emissary.lua:44: attempt to perform arithmetic on local 'timeleft' (a nil value)
Time: 10/17/17 22:53:02
Count: 1
Stack: Interface\AddOns\LockedOut\Emissary.lua:44: attempt to perform arithmetic on local 'timeleft' (a nil value)
Interface\SharedXML\SharedBasicControls.lua:208: in function origErrorHandler' ...rface\AddOns\TradeSkillMaster\Debug\ErrorHandler.lua:317: in function <...rface\AddOns\TradeSkillMaster\Debug\ErrorHandler.lua:300> (tail call): ? Interface\AddOns\LockedOut\Emissary.lua:44: in function Lockedout_BuildEmissary'
Interface\AddOns\LockedOut\Character.lua:129: in function Lockedout_GetCurrentCharData' Interface\AddOns\LockedOut\Configuration.lua:287: in function ?'
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:145: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:145>
[string "safecall Dispatcher[3]"]:4: in function <[string "safecall Dispatcher[3]"]:4>
[C]: ?
[string "safecall Dispatcher[3]"]:13: in function ?' ...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:90: in function Fire'
Interface\AddOns\Ace3\AceEvent-3.0\AceEvent-3.0.lua:120: in function <Interface\AddOns\Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>

Locals:

ERROR 2
Message: Interface\AddOns\LockedOut\Emissary.lua:44: attempt to perform arithmetic on local 'timeleft' (a nil value)
Time: 10/17/17 22:53:15
Count: 1
Stack: Interface\AddOns\LockedOut\Emissary.lua:44: attempt to perform arithmetic on local 'timeleft' (a nil value)
Interface\SharedXML\SharedBasicControls.lua:208: in function origErrorHandler' ...rface\AddOns\TradeSkillMaster\Debug\ErrorHandler.lua:317: in function <...rface\AddOns\TradeSkillMaster\Debug\ErrorHandler.lua:300> [C]: ? Interface\AddOns\LockedOut\Emissary.lua:44: in function Lockedout_BuildEmissary'
Interface\AddOns\LockedOut\Character.lua:129: in function Lockedout_GetCurrentCharData' Interface\AddOns\LockedOut\Minimap.lua:337: in function ShowInfo'
Interface\AddOns\LockedOut\Configuration.lua:236: in function `OnEnter'
Interface\AddOns\ChocolateBar\Chocolate.lua:216: in function <Interface\AddOns\ChocolateBar\Chocolate.lua:186>

Locals: errorMessage = "Interface\AddOns\LockedOut\Emissary.lua:44: attempt to perform arithmetic on local 'timeleft' (a nil value)"
DisplayMessageInternal = defined @interface\SharedXML\SharedBasicControls.lua:191
MESSAGE_TYPE_ERROR = 0

commented

yea. i think i finally have it fixed. thanks for being the guinea pig :). i should have a fix checked in soon for it.

the only unresolved issue that i'm just going to have to let go is that when the emissary is finished on another computer and you log into a different one - it may not appear as the timeleft function does not always return after logging in. luckily it seems to work initially on login which gives me enough time to build the list initially.

commented

What do you mean by playing on another computer? Is it that the settings are cached inside the saved variables folder, locally, do you mean? I'm playing on 2 computers everyday (home pc and on laptop at work), but I simply copy my addons/WTF folders between the computers so it should act like just one computer, right?

commented

yea. i play between a laptop and pc - but not copying the WTF folders. the only thing i sync is this addon across both since i tend to do development on both the pc and laptop.

if you have LT and PC and you finish 3 emissary quests on all - bounties returns 0 (that's whats use to populate the buttons on the map). however, C_TaskQuest.GetQuestTimeLeftMinutes( questid ) returns for a very brief time after login. this leaves me partially in a good spot (i can get the time remaining and infer which day it's for) as well as everything else that goes with it (how many 4/4 - completed, etc).

if for some reason the addon waits too long to query you can't get the remaining time as it (i guess) finally has sync'd with the server and realizes that you finished the quest so the remaining time is techincally 0 - since it's completed.

commented

ok. you may have to reset your local db but go ahead and get the latest code and see if it fixes the issue.

commented

Got a question related to this. When the currency selection (toggles) will be added, by any chance would there be an on/off toggle for emissaries tracking too? In my (personal) use case, I'm really not interested in tracking emissaries for my chars (I only do them on main char). And if a toggle would be added, would it only act as a visual toggle, or it would actually disable the emissary code too in the addon?

commented

it should have an option under config. if not i'll make sure to add one. currently the login servers are busy/down so i can't get on to check. but it should be under the section "Emissary Options".

commented

Yes the option is there, did not know about it. But my question was if the toggle is unchecked, does the code still runs the checks for the emissaries (just not display them) or it stops the checks too?

commented

ah. yes. it still runs. At this point it just doesn't show them - however if they renable the option, they'll see the current data as it's being tracked. it's just as easy though to disable the running in the background as well.

commented

Was asking because you said earlier that the addon does long querries at each char login in order to update the emissaries. So I suppose it would be best for efficiency to disable the querries if the thing is disabled in addon settings.

commented

ah - sorry, that's not what i meant by that. what i meant was there is a lag between what the client has and what the server is sending it. So the function i was using to query emissary data sometimes returns what i want (it's completed, but it still returns the timeleft). Essentially the api is errroing on the side of caution when returning the data. After a few seconds - or more depending on latency - the server finally syncs to the client and that function now returns 0.

I see the something similar on my shaman. I have not started Argus so the world quests for that one is not available. I see the icon most of the time on my minimap just hovering over it says something to the effect of "not available, you haven't unlocked it". But last night with some lag on my part or the server - the armies of the light emissary quest was not showing up until about 30-60 seconds after login. Which really confused me as i was trying to debug the emissary quest problem :).

But it's not a problem to stop tracking that at the individual functions....i'll work on that as part of the next release :).