WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Hide talking head. (https://www.wowinterface.com/forums/showthread.php?t=55806)

Lesteryoung 10-16-17 10:27 PM

Hide talking head.
 
Hi, the addon, https://mods.curse.com/addons/wow/hidetalkinghead doesn't seem to work for me.

It gives off the error that the function it is trying to execute doesn't exist.

Does anyone know of a solution to hiding the dialogue popups?

Fizzlemizz 10-16-17 10:55 PM

If you could give the name of the function or better yet the actual error text, it might help. MoveAnything might be another alternative but comes with a bigger footprint.

Lesteryoung 10-17-17 12:52 AM

The error simply says that the function the addon is calling does not exist.

That's it, so maybe the addon is out of date? Idk.

myrroddin 10-17-17 12:55 AM

Ketho, the author, frequents these forums. Perhaps posting the error would help.

Lesteryoung 10-17-17 01:51 AM

The error is:

Code:

1x Tweaks\HideTalkingHead.lua:1: hooksecurefunc(): TalkingHeadFrame_PlayCurrent is not a function
[C]: in function `hooksecurefunc'
Tweaks\HideTalkingHead.lua:1: in main chunk

The code is:

Lua Code:
  1. hooksecurefunc("TalkingHeadFrame_PlayCurrent", function()
  2.     TalkingHeadFrame:Hide()
  3. end)

Fizzlemizz 10-17-17 10:51 AM

Having had a look I don't see anything wrong. If you start the game and type

Code:

/run TalkingHead_LoadUI()
then
Code:

/run hooksecurefunc("TalkingHeadFrame_PlayCurrent", function() TalkingHeadFrame:Hide() end)
it works fine as HideTalkingHead loads with the Blizzard TalkingHeadUI.

I'm not sure what "Tweaks\" is doing the the path to the .lua file, check that
Code:

## LoadOnDemand: 1
## LoadWith: Blizzard_TalkingHeadUI

have not beed removed from the .toc file.

Lesteryoung 10-17-17 06:08 PM

Ah, I see what happened.

I have my own lua/toc file filled with small 3-10 line UI tweaks so I don't have 20 addons that are 1kb in my addon folder; I thought I could simply copy/paste the code into my lua, not knowing there were dependencies in the toc.

My mistake.

Fizzlemizz 10-18-17 01:35 AM

Quote:

Originally Posted by Lesteryoung (Post 325575)
I have my own lua/toc file filled with small 3-10 line UI tweaks so I don't have 20 addons that are 1kb in my addon folderMy mistake.

No real gain, and you've just proven at least one reason why it's not a great idea.

Kanegasi 10-18-17 03:48 AM

Quote:

Originally Posted by Lesteryoung (Post 325575)
Ah, I see what happened.

I have my own lua/toc file filled with small 3-10 line UI tweaks so I don't have 20 addons that are 1kb in my addon folder; I thought I could simply copy/paste the code into my lua, not knowing there were dependencies in the toc.

My mistake.

I do the same thing. I have a "Frankenstein's monster" addon that's just a collection of my personal tweaks and stolen code from addons small enough to be absorbed into it. I can recall at least two addons that are now literally one line of code in my personal addon.

The difference between my method and yours is that I don't blame the original code, or the author, when I make mistakes.

MunkDev 10-18-17 12:07 PM

Quote:

Originally Posted by Lesteryoung (Post 325575)
Ah, I see what happened.

I have my own lua/toc file filled with small 3-10 line UI tweaks so I don't have 20 addons that are 1kb in my addon folder; I thought I could simply copy/paste the code into my lua, not knowing there were dependencies in the toc.

My mistake.



Lua Code:
  1. local function HookTalkingHead()
  2.     -- do the thing
  3. end
  4.  
  5. if TalkingHeadFrame then
  6.     HookTalkingHead()
  7. else -- Hook to the loading function.
  8.     hooksecurefunc('TalkingHead_LoadUI', HookTalkingHead)
  9. end


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

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