WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   WoD Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=151)
-   -   Fixing an old Addon for 6.x (https://www.wowinterface.com/forums/showthread.php?t=49837)

Tntdruid 09-04-14 04:34 AM

Fixing an old Addon for 6.x
 
This is when testing on WoD Beta


Message: Interface\AddOns\TurnIn\TurnIn.lua:335: attempt to call global 'QuestInfoFadingFrame_OnUpdate' (a nil value)
Time: 09/04/14 12:27:20
Count: 1
Stack: Interface\AddOns\TurnIn\TurnIn.lua:335: in function `TI_HandleAcceptQuest'
Interface\AddOns\TurnIn\TurnIn.lua:320: in function <Interface\AddOns\TurnIn\TurnIn.lua:264>


Locals: (*temporary) = nil
(*temporary) = nil
(*temporary) = 1
(*temporary) = "attempt to call global 'QuestInfoFadingFrame_OnUpdate' (a nil value)"


335 is


function TI_HandleAcceptQuest()
QuestInfoFadingFrame_OnUpdate(QuestInfoFadingFrame, 1);
QuestDetailAcceptButton_OnClick();
end



Any way to fix that? been looking on http://www.wowwiki.com/Api no luck, i'm new to wow coding :)


The addon is abandoned, i hope i can fix it, was 1 of my fav addons :)

Phanx 09-04-14 05:04 AM

The quest tracker has changed quite a bit in WoD. I'm not familiar with the addon you're using, and you didn't provide a link, but based on what little detail you did provide, it looks like an "auto turn in quests" addon -- have you considered switching to a more modern addon that's actively maintained? There are plenty to choose from, eg. QuickQuest.

Tntdruid 09-04-14 05:08 AM

Link http://wow.curseforge.com/addons/turn-in/

I was gonna use the addon to learn some lua whit :)

Phanx 09-04-14 08:49 PM

Well, based on the code you posted, that addon is not using very good coding practices, so I would strongly recommend against using it as a learning tool. It also appears to using rather circuitous methods to automate quests, by maniuplating the default UI's frames to replicate exactly what happens when you interact with those frames yourself, rather than doing what an addon should be doing, which is just calling the underlying API methods directly.

It's like designing a machine to cook ramen for you, but instead of just making something like you'd probably imagine -- a self-contained unit, kind of like a rice cooker maybe -- you instead make an android that can do all the things you'd do yourself to cook the ramen for you in a pot on the stovetop. Obviously this is inefficient and will break if you change anything about your kitchen setup. Much easier just to make a self-contained unit you can just hook up to a water line, then drop in a packet of ramen and push a button, so it doesn't need to know what your pots look like, how to use your stove controls, how to open your cupboards, etc.

If you want to use a quest-automating addon to learn about writing WoW addons, I'd suggest looking at the one I linked earlier, as it's author is actually using the API correctly and the addon is written in a sensible way in accordance with current best practices. :p

Tntdruid 09-04-14 11:33 PM

Thanks for the tip, i'm not gonna use this that old addon :)


All times are GMT -6. The time now is 11:54 PM.

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