CommunityDKP

CommunityDKP

194k Downloads

Validate Table can't handle MonolithDKP-style decay

MrTreng opened this issue ยท 1 comments

commented

I have a DKP table that I have been using since MonolithDKP. When I switched to CommunityDKP, I used the import functionality to keep our DKP data, which contained DKP decay entries that simply store the desired decay percentage, e.g. "-20%", instead of absolute DKP values.

When I try to use the Validate Table function from CommunityDKP version 3.2.3, I get a LUA error in Validate.lua:106, indicating that tonumber(dkp[j]) resolved to nil.

When I look at the surrounding code, you seem to assume that all values in the dkp fields can be converted to numbers. I also noticed that the decay entires generated by CommunityDKP store the absolute DKP deductions for each player in an array-string.

commented

@Vapok I hit the same issue when dealing with the bot.
There are basically 2 cases:

  1. Monolith stores % as last entry, and that can be completely disregarded as in the user list there is additional comma , with empty entry
  2. Very old version of Monolith stored a single "-X%" as value entry. This is something you can deal with as you don't know the DKP value at that point. In the Discord bot I disregard those entries at all