WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Lua Errors from Bosstalk (https://www.wowinterface.com/forums/showthread.php?t=56802)

Brellison94 10-24-18 05:49 PM

Lua Errors from Bosstalk
 
6 Attachment(s)
Anyone can help me define on how to fix these select problems?

Attachment 9151

Attachment 9152

Attachment 9153

Attachment 9154

Attachment 9155

Attachment 9156

MuffinManKen 10-24-18 06:22 PM

Error 4 simply looks like that file doesn't exist, so I'd check that path and see.

I believe the locale errors are caused by BossTalk referencing locale IDs that haven't been defined, so they would need to be added in the locale file(s).

Brellison94 10-25-18 09:21 AM

Quote:

Originally Posted by MuffinManKen (Post 330581)
Error 4 simply looks like that file doesn't exist, so I'd check that path and see.

I believe the locale errors are caused by BossTalk referencing locale IDs that haven't been defined, so they would need to be added in the locale file(s).

I found the problem. For some reason the problem is connected to another addon. I disable it, Bosstalk goes with it. Thoughts on how to make it so it is not part of another addon?

MuffinManKen 10-25-18 10:56 AM

What addon is causing a conflict?

Fizzlemizz 10-25-18 12:24 PM

They all appear to be missing Locale entries for an addon using AceLocale.

Search your addons for "Enter an Id." or "Ironaya in Uldamin".

Brellison94 10-25-18 01:45 PM

Quote:

Originally Posted by MuffinManKen (Post 330600)
What addon is causing a conflict?

It is called AudioX II.

Brellison94 10-25-18 01:46 PM

Quote:

Originally Posted by Fizzlemizz (Post 330601)
They all appear to be missing Locale entries for an addon using AceLocale.

Search your addons for "Enter an Id." or "Ironaya in Uldamin".

Took care of those earlier this morning. It's now the issue on how and why another addon is conflicted onto Bosstalk.

MuffinManKen 10-25-18 05:29 PM

Quote:

Originally Posted by Brellison94 (Post 330604)
Took care of those earlier this morning. It's now the issue on how and why another addon is conflicted onto Bosstalk.

So the LibDataBroker error is being caused by another addon? Or is it a different error?

Fizzlemizz 10-25-18 09:57 PM

If it is LibDataBroker then you probably have an addon using an old (pre BfA) version. These days you will get an error if there is an entry in the .toc or an include .xml that lists a file that does not exist.

These used to be ignored.

Brellison94 10-26-18 08:57 AM

Quote:

Originally Posted by MuffinManKen (Post 330605)
So the LibDataBroker error is being caused by another addon? Or is it a different error?

Different Error.

MuffinManKen 10-26-18 09:29 AM

We aren't mind readers. What error is it?

Brellison94 10-26-18 09:29 AM

When I open Bosstalk, I get this Lua Error message.

Lua Code:
  1. Message: Interface\AddOns\BossTalk\Core.lua:532: table index is nil
  2. Time: Fri Oct 26 10:26:03 2018
  3. Count: 1
  4. Stack: Interface\AddOns\BossTalk\Core.lua:532: table index is nil
  5. Interface\AddOns\BossTalk\Core.lua:532: in function `GenerateMenu'
  6. Interface\AddOns\BossTalk\Options.lua:227: in function `func'
  7. ...ace\AddOns\BossTalk\Libs\Dewdrop-2.0\Dewdrop-2.0.lua:741: in function <...ace\AddOns\BossTalk\Libs\Dewdrop-2.0\Dewdrop-2.0.lua:680>
  8.  
  9. Locals: self = <table> {
  10.  SetDefaultModuleLibraries = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:398
  11.  DUEL_REQUESTED = <function> defined @Interface\AddOns\BossTalk\Core.lua:1243
  12.  AddEvent = <function> defined @Interface\AddOns\BossTalk\Core.lua:694
  13.  EnableModule = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:363
  14.  modules = <table> {
  15.  }
  16.  baseName = "BossTalk"
  17.  IterateEmbeds = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:473
  18.  UnregisterComm = <function> defined @Interface\AddOns\BossTalk\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:179
  19.  MakeFunk = <function> defined @Interface\AddOns\BossTalk\Core.lua:797
  20.  SetItemRef_Original = <function> defined @Interface\AddOns\AudioX\AudioX.lua:813
  21.  UNIT_MANA = <function> defined @Interface\AddOns\BossTalk\Core.lua:1300
  22.  Printf = <function> defined @Interface\AddOns\BossTalk\Libs\AceConsole-3.0\AceConsole-3.0.lua:69
  23.  SetDefaultModulePrototype = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:440
  24.  OnCommReceived = <function> defined @Interface\AddOns\BossTalk\Core.lua:1086
  25.  Search = <function> defined @Interface\AddOns\BossTalk\Core.lua:665
  26.  IsEnabled = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:482
  27.  OnCmd = <function> defined @Interface\AddOns\BossTalk\Core.lua:74
  28.  DisableModule = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:381
  29.  GenerateMenu = <function> defined @Interface\AddOns\BossTalk\Core.lua:113
  30.  RegisterMessage = <function> defined @Interface\AddOns\BossTalk\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:116
  31.  GetArgs = <function> defined @Interface\AddOns\BossTalk\Libs\AceConsole-3.0\AceConsole-3.0.lua:144
  32.  data = <table> {
  33.  }
  34.  SendCommMessage = <function> defined @Interface\AddOns\BossTalk\Libs\AceComm-3.0\AceComm-3.0.lua:87
  35.  tcount = <function> defined @Interface\AddOns\BossTalk\Core.lua:583
  36.  UnregisterAllComm = <function> defined @Interface\AddOns\BossTalk\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:200
  37.  SetEnabledState = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:455
  38.  enabledState = true
  39.  COMBAT_LOG_EVENT_UNFILTERED = <function> defined @Interface\AddOns\BossTalk\Core.lua:1222
  40.  RegisterEvent = <function> defined @Interface\AddOns\BossTalk\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:116
  41.  cmdtable = <table> {
  42.  }
  43.  OnEnable = <function> defined @Interface\AddOns\BossTalk\Core.lua:108
  44.  PET_ATTACK_START = <function> defined @Interface\AddOns\BossTalk\Core.lua:1267
  45.  GenerateSync = <function> defined @Interface\AddOns\BossTalk\Core.lua:1167
  46.  CHAT_MSG_MONSTER_YELL = <function> defined @Interface\AddOns\BossTalk\Core.lua:1325
  47.  Enable = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:325
  48.  UnregisterAllEvents = <function> defined @Interface\AddOns\BossTalk\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:200
  49.  MountCheck = <function> defined @Interface\AddOns\BossTalk\Core.lua:1252
  50.  MakeEvent = <function> defined @Interface\AddOns\BossTalk\Core.lua:700
  51.  GetModule = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:241
  52.  defaultModuleLibraries = <table> {
  53.  }
  54.  credits = <table> {
  55.  }
  56.  UnregisterChatCommand = <function> defined @Interface\AddOns\BossTalk\Libs\AceConsole-3.0\AceConsole-3.0.lua:111
  57.  GetName = <function> defined @Interface\AddOns\BossTalk\Libs\AceAddon-3.0\AceAddon-3.0.lua:310
  58.  UNIT_HEALTH = <function> defined @Interface\Ad

MuffinManKen 10-26-18 09:34 AM

Can you attach your BossTalk\Core.lua and BossTalk\Options.lua?

Brellison94 10-26-18 10:55 AM

2 Attachment(s)
Quote:

Originally Posted by MuffinManKen (Post 330620)
Can you attach your BossTalk\Core.lua and BossTalk\Options.lua?

Sure.

Attachment 9162

Attachment 9163

MuffinManKen 10-26-18 02:08 PM

The the problem is in this line:
tempZone.User.args[worldcheck(dbd.useryell[i].w)].args[dbd.useryell[i].zone] = {

Which table index is nil? It's hard to know since there are roughly 10 different indexing operations in that 1 line. I would recommend cleaning that up so that it's more readable, easier to find issues, and also more efficient:
Lua Code:
  1. if(dbd.useryell[i]) then
  2.             if (not dbd.useryell[i].w) then dbd.useryell[i].w = "1" end
  3.             local wc = worldcheck(dbd.useryell[i].w)
  4.             local zone = dbd.useryell[i].zone
  5.             local world_args = tempZone.User.args[wc]
  6.             if(not world_args.args[zone]) then
  7.                 world_args.args[zone] = {
  8.                     type = 'group',
  9.                     name = zone,
  10.                     desc = zone,
  11.                     args = {},
  12.                 }
  13.             end

Without knowing the data, it's hard to pinpoint the problem but splitting that stuff up should help zero in on where the issue is. For example, if dbd.useryell[i].w is a value other than nil, "1", "2" then worldcheck() will return nil.

Efficiency-wise there is no need to call worldcheck over and over, so we assign the result to a variable and that can be re-used everywhere else in that loop.

Some of the variable names I used may not be ideal, so adjust as needed.

MuffinManKen 10-26-18 02:24 PM

There is also another bug that I saw. I don't know if it's related, but the bug is also in AudioX. Both addons override SetItemRef and do it incorrectly.

BossTalk.SetItemRef(link, text, button) take 3 parameters and if it isn't a BossTalk link, passes them on to Blizzard's: BossTalk.SetItemRef_Original(link, text, button);

But that isn't actually Blizzard's, because AudioX is overwriting it too, and if the link isn't one it's interested in, it passes it on to (probably) Blizzard's:
SetItemRef_orig(link,text,button)

Unfortunately, Blizzard's function looks like this:
function SetItemRef(link, text, button, chatFrame)

The chatFrame parameter is being thrown away. And overwriting the function like that is dangerous and can mess up other addons or even the entire system. You should change:
BossTalk.SetItemRef_Original = SetItemRef
SetItemRef = BossTalk.SetItemRef
to:
hooksecurefunc("SetItemRef", BossTalk.SetItemRef)

and then you can remove BossTalk.SetItemRef_Original completely. It's no longer needed since the original code will be automatically called first and then yours will be. AudioX has the same issue and should be fixed in the same way.

Brellison94 10-26-18 04:22 PM

Quote:

Originally Posted by MuffinManKen (Post 330627)
There is also another bug that I saw. I don't know if it's related, but the bug is also in AudioX. Both addons override SetItemRef and do it incorrectly.

BossTalk.SetItemRef(link, text, button) take 3 parameters and if it isn't a BossTalk link, passes them on to Blizzard's: BossTalk.SetItemRef_Original(link, text, button);

But that isn't actually Blizzard's, because AudioX is overwriting it too, and if the link isn't one it's interested in, it passes it on to (probably) Blizzard's:
SetItemRef_orig(link,text,button)

Unfortunately, Blizzard's function looks like this:
function SetItemRef(link, text, button, chatFrame)

The chatFrame parameter is being thrown away. And overwriting the function like that is dangerous and can mess up other addons or even the entire system. You should change:
BossTalk.SetItemRef_Original = SetItemRef
SetItemRef = BossTalk.SetItemRef
to:
hooksecurefunc("SetItemRef", BossTalk.SetItemRef)

and then you can remove BossTalk.SetItemRef_Original completely. It's no longer needed since the original code will be automatically called first and then yours will be. AudioX has the same issue and should be fixed in the same way.

I applied the fix and I am still at the same spot. However, it will now not show me the problem through the Lua Error.

Brellison94 10-26-18 04:40 PM

1 Attachment(s)
Quote:

Originally Posted by Fizzlemizz (Post 330609)
If it is LibDataBroker then you probably have an addon using an old (pre BfA) version. These days you will get an error if there is an entry in the .toc or an include .xml that lists a file that does not exist.

These used to be ignored.

Maybe this perhaps? I've been eyeballing on this file for a while.

Attachment 9164

MuffinManKen 10-26-18 07:56 PM

Quote:

Originally Posted by Brellison94 (Post 330628)
I applied the fix and I am still at the same spot. However, it will now not show me the problem through the Lua Error.

Can you attach your fixed lua file?

MuffinManKen 10-26-18 07:57 PM

Quote:

Originally Posted by Brellison94 (Post 330629)
Maybe this perhaps? I've been eyeballing on this file for a while.

That does list Libs\libDataBroker-1-1\libDataBroker-1-1.lua so if that file doesn't exist you will get an error.


All times are GMT -6. The time now is 04:22 PM.

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