Thread Tools Display Modes
08/26/15, 04:34 AM   #1
@AlphaLemming
 
@AlphaLemming's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 122
QuestInfo Bug

Did anyone encounter this too?

GetJournalQuestInfo(questId) returns a empty array if on a german client and has crafting quest Alchemy writ with completed steps?
  Reply With Quote
08/26/15, 04:44 AM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by @AlphaLemming View Post
Did anyone encounter this too?

GetJournalQuestInfo(questId) returns a empty array if on a german client and has crafting quest Alchemy writ with completed steps?
Yes. Wandamey figured out how it's correct:
Lua Code:
  1. for questIndex = 1, MAX_JOURNAL_QUESTS do
  2.     if IsValidQuestIndex(questIndex) then
  3.       questType = GetJournalQuestType(questIndex)
  4. ...
Because the questIndex does not change, if you complete another quest with a lower index.
  Reply With Quote
08/26/15, 04:50 AM   #3
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Uh, so when I'm iterating for i = 1, GetNumJournalQuests() I'm doing it wrong? Because that function returns the number of active quests, but they can be index 5, 7 and 13?
  Reply With Quote
08/26/15, 04:53 AM   #4
Fyrakin
 
Fyrakin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 129
Originally Posted by merlight View Post
Uh, so when I'm iterating for i = 1, GetNumJournalQuests() I'm doing it wrong? Because that function returns the number of active quests, but they can be index 5, 7 and 13?
Quest index is not a quest ID. It is just an order representation number for the stock quest tool. So, you have to check the number if its valid before doing anything else.
  Reply With Quote
08/26/15, 04:56 AM   #5
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by merlight View Post
Uh, so when I'm iterating for i = 1, GetNumJournalQuests() I'm doing it wrong? Because that function returns the number of active quests, but they can be index 5, 7 and 13?
Yes. That was a trap in Potion Maker. It was reported, that the writ potion was not found. After Wandamey told me, that the index does not change and I should use MAX_JOURNAL_QUESTS, I found that IsValidQuestIndex function in ESO code.
  Reply With Quote
08/26/15, 05:24 AM   #6
Wandamey
Guest
Posts: n/a


Apparently the only purpose of GetNumJournalQuests is to display that "Quests : num/25"

but the indexes change as soon as you complete a new step of any quest i think (i didn't exactly figured that one), which made this hard to detect. (not to mention that getting no nil error when iterating an empty array is a bit counterintuitive)

I found an even easier way to iterate recently but never used it and i didn't keep the test, maybe something along getnextquest. But anyway, it's just a 25 lines array.
  Reply With Quote
08/26/15, 05:41 AM   #7
@AlphaLemming
 
@AlphaLemming's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 122
What a mess, thanks all for the informations!
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » QuestInfo Bug


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