Old Addon Help! (FastDisenchant)
Hi guys!
So I'm actually here because I'm rather miffed as to why this addon simply will not do it's job. I've added the itemID's for WoD but it doesn't seem to want to loot regardless of which expansion. Now I'm assuming blizzard changed something in the later expansions and broke this old addon and all I ask is someone to point me in the right direction of fixing this gem. It's a rather simple coded thing and I'm sure the answer is quite obvious to those who have dealt with these types of codes before. *I code in sourcepawn so I understand the difference! Anyway, without further delays here is the code! Code:
local FastDEItems = { |
You could try replacing LootSlotIsItem with LootSlotHasItem, it should be throwing an error since that function doesn't exist.
|
Just did what you've suggested and it still has no functionality.
Oddly enough I do not get any lua errors from it at all. I suppose the code itself is fine but it simply does not auto-loot. |
Might have to replace "this:RegisterEvent" with "self:RegisterEvent".
If you look under "help" in the interface menu there's an option to display lua errors, they're probably turned off since this should definitely be throwing errors. |
It that all the code or do you have an XML file with the frame in it?
In all honesty, for a simple addon like this, you could just hook LootFrame itself. Lua Code:
PS: From the code example, it appears to be mixed with code from vanilla WoW. Globals like this are no longer in use. |
Quote:
With that said, I just swapped out that piece of info and got this: Code:
Message: Interface\AddOns\FastDisenchant\FastDisenchant.lua:120: attempt to index global 'self' (a nil value) |
Quote:
With your code I do not see a way to call the functions with the xml file though? -if I'm understanding this right. XML file : Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ Edit: Fixed! I simply replaced FastDisenchant_OnLoad(); with LootFrame:HookScript(); and removed the <OnEvent> section of the code. Thank you so much! |
Quote:
For future reference, you should avoid using XML as it's exceedingly difficult to debug. If something is wrong with your syntax, the entire file fails to load with no notice. There are very few examples where XML is necessary. You can do almost everything using pure Lua. |
Quote:
Glad to be learning more about this! |
All times are GMT -6. The time now is 09:20 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI