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 :cool: 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) - 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 |
What would happen if your targetname (arg7) is "A'lar" for example?
A name with one single quote. Could that destroy your variable? Not sure if you filter special characters out before using them. Maybe you could NPCID's instead. You could try double quotes and/or parse the string "Melee" into a variable in forehand and use the variable instead of the string each time. The guys who posted it should tell you where it happened. If it works for you all of the time but for some it does not, on special occasions. My suggestion would be to let him post what is parsed into his trackMelee function. So let him post "amount" and "arg7". You could then hardcode these values and test the behaviour. Saving the complete lua file in Unicode (UTF-8) may help if the language used is out of order. Code:
print("amount: "..amount.." / arg7: "..arg7) |
Would be nice to get a dump of their "tdPlayer" Saved Variable. Also because we don't have the full error report (with line numbers and local variables) it is much harder to fix, also I don't know what version the person is using so even if we had line numbers they may be wrong.
|
Quote:
So tdPlayer is a table with guid's ... Code:
tdPlayer = { |
Nah I was specifically referring to the SVs of people experiencing the bug, according to the error you provided (attempt to index field 'Melee' (a number value)). tdPlayer[<playerguid>].ods.Melee is a number value instead of a table, and after looking at your code I have no idea why this would happen other than people manually changing the SVs or a previous version of your mod saved tdPlayer[<playerguid>].ods.Melee as a number and has remained like that ever since.
|
Quote:
|
Ok thanks all
I got the Sv from a friendly guy, who had the bug: Code:
... Anyway, next update of the addon will get a hard reset op all SVs. Thanks all |
All times are GMT -6. The time now is 10:57 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI