View Single Post
09-22-10, 04:16 AM   #1
Sideshow
A Flamescale Wyrmkin
 
Sideshow's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 103
Help with TinyDPS - Mysterious error

Hello

Some of the users (small percentage) are complaining about a bug.
I never had or have the issue, so I can't solve it.

So I require aid

The problem is located in a little function used to track spells. Well I have 3 of those actually, one for spells, one for heals and one for melee. The melee one is causing the trouble:

Code:
local function trackMelee(amount, arg7)
	if tdps.trackSpells then
		if not tmp.cds['Melee'] then tmp.cds['Melee'] = {} end -- make the spell
		if not tmp.ods['Melee'] then tmp.ods['Melee'] = {} end
		tmp.cds['Melee'][arg7] = (tmp.cds['Melee'][arg7] or 0) + amount -- record the amount
		tmp.ods['Melee'][arg7] = (tmp.ods['Melee'][arg7] or 0) + amount
	end
end
- Arg7 is the target name. (all 'args' come from the combat event ofcourse)
- tmp is a reference to the current combatant.
- cds is a table with damage spells of the current fight.
- ods is the same but the for overall data
- Since melee is no spell, I just write 'Melee' ofcourse. (The other function for real spell has an extra paramater and looks like this: local function trackSpell(amount, arg7, arg10)
- At the end, 'Melee' is a table in a table, containing names of mobs. The value of the mob name is a number. (in the case 'damage done')

Now the error: attempt to index field 'Melee' (a number value)
Again, only a marginal percentage of users get this error.
I have no clue.

Any help ?
http://www.wowinterface.com/download....html#comments
  Reply With Quote