View Single Post
01/30/23, 12:27 PM   #9
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Would have been to easy if all had worked just fine...
I think the error did not show for me as I had added some new lines locally within AF API.lua. Unsure why it shows at all though as the translations are there

Edit:
I guess I missed the [ ] around the table index constant subMenuEntryAllSets here:
Lua Code:
  1. --First add 1 entry for "All monster sets"
  2.     local stringsAllEN = { subMenuEntryAllSets = transl.ALL_MONSTER_SETS_SUBMENU_ENTRY }
  3.     local stringsAllDE = { subMenuEntryAllSets = transl.ALL_MONSTER_SETS_SUBMENU_ENTRY }
  4.     local stringsAllFR = { subMenuEntryAllSets = transl.ALL_MONSTER_SETS_SUBMENU_ENTRY }

The tables stringsAllEN DE and FR are passed in as you register the new dropdown filter plugin. It contains a key, which should be the same as the entry that runs the filter callback (which is defined via
Code:
local allMonsterSetsDropdownCallback = { {name = subMenuEntryAllSets, filterCallback = GetFilterCallbackForSets( allSetsConstantId )} }
's "name" tag
)
and thus needs the "subMenuEntryAllSets" costant as table key within stringsAllEN, DE and FR.

Try if changing these lines (add the [ ]) helps removing the error:
Lua Code:
  1. --First add 1 entry for "All monster sets"
  2.     local stringsAllEN = { [subMenuEntryAllSets] = transl.ALL_MONSTER_SETS_SUBMENU_ENTRY }
  3.     local stringsAllDE = { [subMenuEntryAllSets] = transl.ALL_MONSTER_SETS_SUBMENU_ENTRY }
  4.     local stringsAllFR = { [subMenuEntryAllSets] = transl.ALL_MONSTER_SETS_SUBMENU_ENTRY }

Last edited by Baertram : 01/30/23 at 02:51 PM.
  Reply With Quote