ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   GetJournalQuestName(i) returns blank sometimes (https://www.esoui.com/forums/showthread.php?t=10025)

tim99 12/25/21 02:44 AM

GetJournalQuestName(i) returns blank sometimes
 
Here is a screenshot, which says more than 1000 words i hope.


Have 18 Quests in Journal, showing all Quest-Names by the API, it returned "blank" for one. You can't get any informations any more for that quest, with any Quest-API out here.


You also can't share this quest any more.






I have had this in the past, it happened 2 or 3x during the current NewLifeFestival,

2x on a delve-daily quest in the last blackwood-event.



Reported by others it happens much more often to them, but have no verification for this.


You can still complete the quest ingame for yourself without any issues. You get the rewards, all fine.
You can just not share them, and i guess they break any addon which deals with quest-names.

Calamath 12/25/21 03:35 AM

I think it is not a bug in the API, just your misunderstanding.
The result of IsValidQuestIndex(10) shows that the index 10 is an invalid index.
So the behavior of GetJournalQuestName for an invalid index is correct.

The quest you are missing should be in one of the indexes 19-25.

- Calamath

tim99 12/25/21 04:58 PM

Quote:

Originally Posted by Calamath (Post 45119)
I think it is not a bug in the API, just your misunderstanding.
The result of IsValidQuestIndex(10) shows that the index 10 is an invalid index.
So the behavior of GetJournalQuestName for an invalid index is correct.

The quest you are missing should be in one of the indexes 19-25.

- Calamath




ooooh ok... so there can be "spaces" of wrong indexes in the rows of 1 to GetNumJournalQuests()? I actually never would have thought of that :D So if i wanna check if i have a special quest in the journal the GetNumJournalQuests() ist basically useless and i should check for 1 to 25 and skip blank ones?


Good hint, thx. Would explain the addon breaking if i just look at half of the quests (1..GetNum). I will check it the next time. I would have bet all my ingame money that this is a bug :D ( not any more ofc :p )




edit. didnt find a "delete post" function. Shall i empty out all text or leave it?

Calamath 12/25/21 07:32 PM

Yes, we should use the global constant MAX_JOURNAL_QUESTS (=25) instead as the loop count.
And for each index, you need to check if it is valid or not. ;)

- Calamath

sirinsidiator 12/26/21 10:36 AM

Quote:

Originally Posted by tim99 (Post 45121)
edit. didnt find a "delete post" function. Shall i empty out all text or leave it?

I moved it to the general discussion forum, since it may help other authors in the future.

tim99 12/28/21 01:25 AM

Quote:

Originally Posted by Calamath (Post 45122)
Yes, we should use the global constant MAX_JOURNAL_QUESTS (=25) instead as the loop count.
And for each index, you need to check if it is valid or not. ;)

- Calamath

Quote:

Originally Posted by sirinsidiator (Post 45123)
I moved it to the general discussion forum, since it may help other authors in the future.


Thx both.

However, there still might be a little bug, cause the "can't share these quests" point is still valid.

It was not a made-up point to reinforce the argument, i actually had this a couple times.

An idea is, that even ZOS is doing a "1..GetNumJournalQuests()" for the sharing-feature. That would explain why sometimes you just can't share a quest, and after delete-and-regain that one, you can.

There are some other points, which can be confusing, such as some quests can't be shared to someone who has not done needed pre-quests (like 2 delve-dailys in Wrothgar) or you can't share to someone who has already done it that day, or has the same kind of quest already in his journal.

But i think, the importance of this case approaches zero, especially when we have a "way around"... (1..MAX_JOURNAL_QUESTS) :banana:


All times are GMT -6. The time now is 08:57 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI