Thread Tools Display Modes
06/02/23, 08:11 AM   #1
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 244
Exclamation Daily enchanting writ returns (type=none)(name=empty string)

I was doing some writs and noticed my compatibility mod I made for my addon for dailys wasn't functioning so I did some digging and discovered:

Code:
CRAFTING
     Enchanter Writ
           craft supurb glyoh of health with ta
           aquire jehade potency rune
returns QUEST_TYPE_NONE and crafting name = [empty string] so I can't even filter it out by name if I wanted to. Seems like a bug to me so I'm reporting it. I suspect its not the only one like this.

IMO since it is in the CRAFTING section of the quest journal with all the other "QUEST_TYPE_CRAFTING" daily writs AND literally says "craft a supurb glyph...", that it should also be considered a "QUEST_TYPE_CRAFTING" quest and all the others with a similar problem.

Last edited by sinnereso : 06/03/23 at 04:17 PM.
  Reply With Quote
06/02/23, 10:50 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
What API functions do you refer to please if you say "it returns", and the values are wrong/nil/empty?
Any GetQuest* API?

Mentioning your addon is not enough for a bug report. Please provide an exemple code to run to see that bug and also test it with all addons disabled to see if it really is a bug, or an addon created bug.
Thank you
  Reply With Quote
06/02/23, 01:21 PM   #3
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 244
sorry heres the entire function.

Code:
function MyAddon.HasWritQuest()-- << CHECK FOR ACTIVE WRITS
	for quest=1, GetNumJournalQuests() do
		if GetJournalQuestType(quest) == QUEST_TYPE_CRAFTING then return true end
		--df(tostring(GetJournalQuestType(quest)))
		--df(tostring(GetJournalQuestName(quest)))
	end
	return false
end
df(tostring(GetJournalQuestType(quest))) returns QUEST_TYPE_NONE
and
df(tostring(GetJournalQuestName(quest))) returns [Empty String]

for that particular quest.. the remaining quests in my journal return properly as normal.

Last edited by sinnereso : 06/02/23 at 01:28 PM.
  Reply With Quote
06/03/23, 03:24 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
What client language do you use, is it English?
I remember there was something with French e.g.

And what does GetJournalQuestName return for that quest?
  Reply With Quote
06/03/23, 05:24 AM   #5
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 244
Originally Posted by Baertram View Post
What client language do you use, is it English?
I remember there was something with French e.g.

And what does GetJournalQuestName return for that quest?
yes its the english client and GetJournalQuestName returns "[Empty String]"

**EDIT
Just checked todays writs and they're fine. all returning QUEST_TYPE_CRAFTING and correct names..But yesterdays enchanting was not.

Last edited by sinnereso : 06/03/23 at 04:18 PM.
  Reply With Quote
06/03/23, 11:46 AM   #6
Calamath
AddOn Author - Click to view addons
Join Date: Aug 2019
Posts: 36
It is not a bug, you should peruse this thread first.

- Calamath
  Reply With Quote
06/03/23, 01:06 PM   #7
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 244
Originally Posted by Calamath View Post
It is not a bug, you should peruse this thread first.

- Calamath
I checked it out and asside from what appears to be many assumtions there it doesnt match my scenario. I only had the daily writs quests in my journal which equalled 7 not 10 and today I can repeat the process 100x and its fine but yesterday ONLY the enchanting writ quest which was the 5th index value at the time was returning QUEST_TYPE_NONE and name [empty string] repeatedly. today repeatedly the enchanting writ is fine with the exact same number of quests in my journal. Today is a different enchanting writ tho so ill be watching for that same one to return to compare results once again.

Last edited by sinnereso : 06/03/23 at 04:19 PM.
  Reply With Quote
06/03/23, 01:55 PM   #8
Calamath
AddOn Author - Click to view addons
Join Date: Aug 2019
Posts: 36
You didn't get the point of the thread, so I'll copy and paste.

You 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.

This is really hard for me to say, the bug is in your code.

- Calamath
  Reply With Quote
06/03/23, 04:09 PM   #9
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 244
Originally Posted by Calamath View Post
You didn't get the point of the thread, so I'll copy and paste.

You 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.

This is really hard for me to say, the bug is in your code.

- Calamath
ok ill give it a whirl.
  Reply With Quote
06/03/23, 06:49 PM   #10
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 626
Not to mention that Crafting Quests may not be quests that involve crafting. It is probably the certification quests.

Ignore the classification you want and get the quest data ZOS provides using GetJournalQuestType(). See how ZOS classifies them. Irrespective of how you think they should be classified, their classification is what ZOS chose.You may not be able to filter writ quests you don't want by the quest type "crafting" because they are probably daily quests.

Last edited by Sharlikran : 06/04/23 at 07:17 AM.
  Reply With Quote
06/03/23, 09:35 PM   #11
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 408
Here's my current implementation of a writ search function, which as far as I know works well. It does have a bit more functionality, but you can strip that out if you don't need it. Line 446 in WritCreator.lua.
Lua Code:
  1. local function writSearch()
  2.     local W = {}
  3.     local anyFound = false
  4.     if not WritCreater.questExceptions then
  5.         return {}, false
  6.     end
  7.     for i=1 , 25 do
  8.         local Qname=GetJournalQuestName(i)
  9.         Qname=WritCreater.questExceptions(Qname)
  10.         if (GetJournalQuestType(i) == QUEST_TYPE_CRAFTING or string.find(Qname, WritCreater.writNames["G"])) and GetJournalQuestRepeatType(i)==QUEST_REPEAT_DAILY then
  11.             for j = 1, #WritCreater.writNames do
  12.                 if string.find(myLower(Qname),myLower(WritCreater.writNames[j])) then
  13.                     W[j] = i
  14.                     anyFound = true
  15.                 end
  16.             end
  17.         end
  18.     end
  19.     return W , anyFound
  20. end
writNames["G"] is "writ", writNames[1 -> 6] are the craft specific names of writs. questExceptions is a pre-format function you can overwrite for specific languages, but not really too important. All of the writNames and questExceptions can be found in the various localization files.

Last edited by Dolgubon : 06/03/23 at 09:37 PM.
  Reply With Quote
06/04/23, 12:54 AM   #12
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
Moved to appropriate forum as this is not a bug, thanks Calamath for the reference.
  Reply With Quote
06/05/23, 10:11 AM   #13
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 244
Originally Posted by Baertram View Post
Moved to appropriate forum as this is not a bug, thanks Calamath for the reference.
ok I'll go back to GetNumJournalQuests() instead of MAX_JOURNAL_QUESTS since everything is working as intended because I want to run it 5x if 5 quests not 25.
  Reply With Quote
06/05/23, 11:53 AM   #14
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
You still did not understand it!
You Must use the max 25 constant as there are gaps in the quest indices and only the "valid" ones (which you need to check via the API functions mentioned by Calamath and others above) of the 1 to 25 are the 5 you got in your list. It's not always 1, 2, 3, 4, 5 as your current situation may have and where it works!
  Reply With Quote
06/05/23, 12:20 PM   #15
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 244
Originally Posted by Baertram View Post
You still did not understand it!
You Must use the max 25 constant as there are gaps in the quest indices and only the "valid" ones (which you need to check via the API functions mentioned by Calamath and others above) of the 1 to 25 are the 5 you got in your list. It's not always 1, 2, 3, 4, 5 as your current situation may have and where it works!
OK now that sense.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Daily enchanting writ returns (type=none)(name=empty string)

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