Quantcast Help solve an Error - WoWInterface
 
Thread Tools Display Modes
11-17-19, 12:49 AM   #1
tinyu
A Molten Giant
 
tinyu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 834
Help solve an Error

Back in the day I used an addon called _Corpse that would tell me if a corpse I find when out questing was from the opposing faction or not and if they were online or not.

I have been making slow progress with getting it to work with Classic but i have run into an error I can't figure out (very limited knowledge on my part).

The error is this.

Code:
Date: 2019-11-17 01:55:20
ID: -1
Error occured in: Global
Count: 3
Message: ..\AddOns\_Corpse\_Corpse.lua line 115:
   Usage: UnitDebuff("unit", [index][, "filter"])
Debug:
   [C]: ?
   [C]: UnitDebuff()
   _Corpse\_Corpse.lua:115: UnitHasCorpse()
   _Corpse\_Corpse.lua:173:
      _Corpse\_Corpse.lua:159
   [C]: ?
   [C]: ?
Here is the addon is it stands atm.

Thank you for your help.
Attached Files
File Type: zip _Corpse.zip (13.7 KB, 17 views)
__________________
"There's no such thing as too many addons."
Lothaer
Titan Dev Team Member.
  Reply With Quote
11-17-19, 01:23 AM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,382
A quick look and there is no validation that UnitID exists or is valid prior to using it ..

UnitDebuff(unit,index) is required .. you have UnitDebuff(UnitID,GHOST)

I assume GHOST is a valid index number, if not you might want to check that as well.
Which means UnitID must be nil or invalid and thus causing an error when attempting to use it.

It might not be the reason but if you haven't checked it out it might be worth doing.
__________________
  Reply With Quote
11-17-19, 07:37 AM   #3
tinyu
A Molten Giant
 
tinyu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 834
Originally Posted by Xrystal View Post
A quick look and there is no validation that UnitID exists or is valid prior to using it ..

UnitDebuff(unit,index) is required .. you have UnitDebuff(UnitID,GHOST)

I assume GHOST is a valid index number, if not you might want to check that as well.
Which means UnitID must be nil or invalid and thus causing an error when attempting to use it.

It might not be the reason but if you haven't checked it out it might be worth doing.
Thank you very much, now I just need to find some dead people to test it on lol.
__________________
"There's no such thing as too many addons."
Lothaer
Titan Dev Team Member.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Help solve an Error

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off