Quantcast Author Question: Summerset Issue on PTS with my Addon - ESOUI
Thread Tools Display Modes
05/07/18, 01:04 PM   #1
DesertDwellers
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 19
Author Question: Summerset Issue on PTS with my Addon

I am the author of FCM Quest tracker, and have basically hit a wall with what I thought was a simple issue, got some help from people here but still have not got past this.

First of all I did not write the original code, so here it goes.

Add on works perfectly fine in live.

In order to update a quest that is selected form the tracker to be focused so that the journal reports the same quest, the following function is executed.

Code:
ZO_QuestTracker["tracker"]:InitialTrackingUpdate()
ZO_QuestTracker it appears on PTS is now called ZO_Tracker, so I tried both, "ZO_QuestTracker["tracker"]:InitialTrackingUpdate" and "ZO_Tracker["tracker"]:InitialTrackingUpdate", and both get this error.

Code:
user:/AddOns/FCMQT/FCMQT.lua:856: attempt to index a nil value
stack traceback:
	user:/AddOns/FCMQT/FCMQT.lua:856: in function 'FCMQT.QuestsLoop'
	user:/AddOns/FCMQT/FCMQT.lua:896: in function 'FCMQT.QuestsListUpdate'
	user:/AddOns/FCMQT/FCMQT.lua:994: in function 'FCMQT.Init'
In live I cannot figure out where "ZO_QuestTracker["tracker"]:InitialTrackingUpdate" is referring to which may be the root problem. I admit my inexperience in LUA programming could be the real root cause. In all of the add on's code it is called twice, and there is no "ZO_*" functions locally that it could be calling instead.

The only thing I can find is "ZO_QuestTracker:InitialTrackingUpdate" on live, and "ZO_Tracker:InitialTrackingUpdate" on PTS. So I changed it on live to this, just to see if that is where it is going to, and I changed it on PTS respectively.

I get this error on both, only difference is what line numbers it errors on in "EsoUI/Ingame/ZO_Quest/QuestTracker.lua". The code it is stopping on is the same.

Code:
EsoUI/Ingame/ZO_Quest/QuestTracker.lua:1012: attempt to index a nil value
stack traceback:
	EsoUI/Ingame/ZO_Quest/QuestTracker.lua:1012: in function 'ZO_Tracker:ClearTracker'
	EsoUI/Ingame/ZO_Quest/QuestTracker.lua:404: in function 'ZO_Tracker:InitialTrackingUpdate'
	user:/AddOns/FCMQT/FCMQT.lua:856: in function 'FCMQT.QuestsLoop'
	user:/AddOns/FCMQT/FCMQT.lua:896: in function 'FCMQT.QuestsListUpdate'
	user:/AddOns/FCMQT/FCMQT.lua:994: in function 'FCMQT.Init'
Below is the code from 100023 where it is topping at, stopping on the first line after the function at "self.treeview:Clear". In 100022 it stops at the exact same line.

Code:
function ZO_Tracker:ClearTracker()
    self.treeView:Clear()--<< Here
    self.headerPool:ReleaseAllObjects()
    self.assistedTexture:SetHidden(true)

    --iterate backwards because SetTracked will change the tracked array size
    for i = GetNumTracked(), 1, -1  do
        local trackType, arg1, arg2 = GetTrackedByIndex(i)
        SetTracked(trackType, false, arg1, arg2)
    end

    for i = 1, #self.tracked do
        local trackedData = self.tracked[i]
        if(trackedData.trackType == TRACK_TYPE_QUEST) then
            RemoveMapQuestPins(trackedData.arg1)
        end
    end
    
    self.tracked = {}
    self.assistedData = nil
    self:UpdateTreeView()
    self:UpdateVisibility()
end
So this tells me they that "ZO_QuestTracker["tracker"]:InitialTrackingUpdate" does not go to either of those functions.

I have also explored many other options, for example using zgoo to look at the tracker itself, and so many other possible solutions other than rewriting code.

I admit it is highly likely this is a lack of knowledge on my part.

So a couple of questions:

Is there a function that will update the focused quest in the journal/map that does not require a complete initialization of the in game tracker?

Is my logic that "ZO_QuestTracker["tracker"]:InitialTrackingUpdate" points to respectfully "ZO_QuestTracker["tracker"]:InitialTrackingUpdate" and "ZO_Tracker["tracker"]:InitialTrackingUpdate" totally flawed and it goes someplace completely different?

Am I a complete idiot? (this question not intended to be answered. )

FYI I did try running both live and PTS with out this being executed, and it appears to work find until you change the quest either on the world map, journal or within my addon itself. This is the world map error I get on PT, it is similar on Live.

Code:
EsoUI/Ingame/ZO_Quest/QuestTracker.lua:438: attempt to index a nil value
stack traceback:
     EsoUI/Ingame/ZO_Quest/QuestTracker.lua:438: in function 'ZO_Tracker:ForceAssist'
     EsoUI/Ingame/Map/WorldMap.lua:2008: in function 'callback'
     EsoUI/Ingame/Map/WorldMap.lua:2491: in function 'ZO_WorldMap_HandlePinClicked'  
     ZO_MapPin0_MouseUp:5: in function '(main chunk)'
Which may be totally unrelated, but I am assuming not.
x

Last edited by DesertDwellers : 05/07/18 at 01:05 PM. Reason: Clearer title
  Reply With Quote
05/07/18, 02:56 PM   #2
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1,539
Not sure why you open a new thread about this as it looks like the same problem you have discussed here already:
http://www.esoui.com/forums/showthread.php?t=7753

Did you read my answer on this thread from 05.05.2018?
Originally Posted by Baertram View Post
ZO_Tracker in API 10022 is a kind of "class" for the variable QUEST_TRACKER.
You build an object QUEST_TRACKER using the methods and attributes defined in ZO_Tracker.

See file questtracker.lua:
https://github.com/esoui/esoui/blob/...esttracker.lua

Lua Code:
  1. function ZO_QuestTracker_OnInitialized(self)
  2.     QUEST_TRACKER = ZO_Tracker:New(self, GetControl(self, "Container"))
  3.     ZO_QuestTracker.tracker = QUEST_TRACKER
  4. end

So calling QUEST_TRACKER.InitialTrackingUpdate() should do the trick.
Not sure if it's the same on PTS though.
ZO_Tracker and ZO_QuestTracker are only the "base" beyond the variables (instances) you create from them (QUEST_TRACKER e.g.).
So calling the base class functions will not work on all variables. You need to call the funcitons on the created instance variables in order to update them properly.
Try to use QUEST_TRACKER.InitialTrackingUpdate() or find the variable which is created for ZO_Tracker on the PTS.

PTS source code (not actual PTS patch but the one before 07.05.2018) to search in can be found here:
https://github.com/esoui/esoui/tree/pts/esoui

Files for quest tracker are located in esoui/ingame/zo_quest e.g.

Last edited by Baertram : 05/07/18 at 03:06 PM.
  Reply With Quote
05/07/18, 03:29 PM   #3
DesertDwellers
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 19
Yes I did, and "QUEST_TRACKER.InitialTrackingUpdate() " did not work either on PTS or on live. On live it with "ZO_QuestTracker["tracker"]:InitialTrackingUpdate()".

QUEST_TRACKER.InitialTrackingUpdate() DOES go to ZO_Tracker:InitialTrackingUpdate(), at least that is where the errors show up at same as this post.

I have not tried it today on PTS with today's update. This was from my weekend testing.

As I mentioned in this post, I have tried many variations.
  Reply With Quote
05/07/18, 03:45 PM   #4
DesertDwellers
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 19
On PTS that change still is not working with QUEST_TRACKER.InitialTrackingUpdate()

Code:
user:/AddOns/FCMQT/FCMQT.lua:856: attempt to index a nil value
stack traceback:
	user:/AddOns/FCMQT/FCMQT.lua:856: in function 'FCMQT.QuestsLoop'
	user:/AddOns/FCMQT/FCMQT.lua:896: in function 'FCMQT.QuestsListUpdate'
	user:/AddOns/FCMQT/FCMQT.lua:994: in function 'FCMQT.Init'
PTS with ZO_Tracker:InitialTrackingUpdate still has same error.

Code:
EsoUI/Ingame/ZO_Quest/QuestTracker.lua:1012: attempt to index a nil value
stack traceback:
	EsoUI/Ingame/ZO_Quest/QuestTracker.lua:1012: in function 'ZO_Tracker:ClearTracker'
	EsoUI/Ingame/ZO_Quest/QuestTracker.lua:404: in function 'ZO_Tracker:InitialTrackingUpdate'
	user:/AddOns/FCMQT/FCMQT.lua:856: in function 'FCMQT.QuestsLoop'
	user:/AddOns/FCMQT/FCMQT.lua:898: in function 'FCMQT.QuestsListUpdate'
	user:/AddOns/FCMQT/FCMQT.lua:996: in function 'FCMQT.Init
'

Not sure on live where "ZO_QuestTracker["Tracker"]:InitialTrackingUpdate()" is going to, but it works there with that only. That does not work on PTS. So something is changed.

Thank you for any help you might be able to give.
  Reply With Quote
05/08/18, 05:26 AM   #5
DesertDwellers
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 19
Originally Posted by Baertram View Post
ZO_Tracker and ZO_QuestTracker are only the "base" beyond the variables (instances) you create from them (QUEST_TRACKER e.g.).
So calling the base class functions will not work on all variables. You need to call the funcitons on the created instance variables in order to update them properly.
Try to use QUEST_TRACKER.InitialTrackingUpdate() or find the variable which is created for ZO_Tracker on the PTS.

PTS source code (not actual PTS patch but the one before 07.05.2018) to search in can be found here:
https://github.com/esoui/esoui/tree/pts/esoui

Files for quest tracker are located in esoui/ingame/zo_quest e.g.

Thank you Baertram, it makes sense.

I was just hoping to find exactly what the original statement is doing, that would make it far easier to duplicate it in Update 18. But if it would be easy, it would not be fun, right.
  Reply With Quote
05/08/18, 08:57 AM   #6
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1,539
btw:
ZO_QuestTracker["tracker"]
=
ZO_QuestTracker.tracker
=
QUEST_TRACKER

See function above I had posted.
Lua Code:
  1. ...
  2. ZO_QuestTracker.tracker = QUEST_TRACKER
  3. ...

So normally you should be either able to use
QUEST_TRACKER:InitialTrackingUpdate(self) (where self relates to the variable QUEST_TRACKER)
or
QUEST_TRACKER.InitialTrackingUpdate(QUEST_TRACKER)
  Reply With Quote
05/08/18, 10:24 AM   #7
DesertDwellers
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 19
Ok, the light just flicked on. Working RL job, will try when done. Thanks for your help and guidance.
  Reply With Quote
05/08/18, 08:50 PM   #8
DesertDwellers
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 19
Solved

Thank you Baertram, everything works now.

Resolved this issue and a few other compatibility issues, and now works perfect on PTS/
  Reply With Quote
05/10/18, 08:10 AM   #9
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1,539
Glad you managed to get it work.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Author Question: Summerset Issue on PTS with my Addon

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off