Wuild / GatherLite

World of Warcraft: Classic Gathering addon keeping track on where you have found stuff
MIT License
32 stars 16 forks source link

Table.filter error & fix #180

Closed mks-mud closed 1 year ago

mks-mud commented 1 year ago

Dear Wuild!

After installing a few other mods Gatherlite no longer showed the nodes on the maps (worldmap & minimap). I've tried to reinstall it, removing the newly installed addons, then deleting the SavedVariables related to GatherLite and the new addons under WTF, but none of that helped.

After some debugging, it looks like the table.filter function is missing from 6.0.5 (it was included in 6.0.4). See attached screenshot for LUA error message: WoWScrnShot_121422_144135

The addon works perfectly fine after adding the table.filter function from 6.0.4 to scripts/modules/worldmap.lua: table.filter = function(t, filterIter) local out = {}

for k, v in pairs(t) do
    if filterIter(v, k, t) then
        out[k] = v;
    end
end

return out

end

Addons that I've installed, according to the CurseForge logs (I'm not sure how this error can be reproduced, or how it worked previously without table.filter): { "timestamp": "2022-12-14T11:34:12.6061621+01:00", "level": "Info", "thread": 17, "memory": 0.0, "message": "[AddonInstalltask] Downloading mod from https://edge.forgecdn.net/files/4171/76/Details-Details.DF.Wrath.10336.148.zip" }, { "timestamp": "2022-12-14T11:35:07.3389279+01:00", "level": "Info", "thread": 15, "memory": 0.0, "message": "[AddonInstalltask] Downloading mod from https://edge.forgecdn.net/files/4090/653/HandyNotes-v1.6.13.zip" }, { "timestamp": "2022-12-14T11:35:35.6837013+01:00", "level": "Info", "thread": 5, "memory": 0.0, "message": "[AddonInstalltask] Downloading mod from https://edge.forgecdn.net/files/4026/370/RareScanner_3.4.0.3.zip" }, { "timestamp": "2022-12-14T11:35:52.070548+01:00", "level": "Info", "thread": 5, "memory": 0.0, "message": "[AddonInstalltask] Downloading mod from https://edge.forgecdn.net/files/4136/238/GTFO-4.70-Wrath.zip" },

I think reintroducing the table.filter should help on everyone else that has a similar problem.

Best regards, Mark

Wuild commented 1 year ago

shit, it must have been removed while reconstructing the addon. as im using the same function in other addons im working on i didnt notice it. ill add it right back! thank you!

mks-mud commented 1 year ago

Thank you for the super-fast response! And thank you for maintaining it!

Wuild commented 1 year ago

Updated! should be on curseforge in a minute or 2! thank you for reporting it!