ALL THE THINGS

ALL THE THINGS

31M Downloads

Error on Login after resetting SavedVariables

Ravendwyr opened this issue ยท 1 comments

commented

Good morning,

I hope you are all staying safe and well!

I recently decided to wipe my ATT saved variables file on a whim and have the addon rebuild it from scratch, but after doing so this error appears on login:

1x AllTheThings\AllTheThings-SL-2.3.0-96-g07e2a1a.lua:17756: attempt to index field 'Artifacts' (a nil value)
[string "@AllTheThings\AllTheThings-SL-2.3.0-96-g07e2a1a.lua"]:17756: in function <AllTheThings\AllTheThings.lua:17523>
[string "@AllTheThings\src\base.lua"]:17: in function <AllTheThings\src\base.lua:17>

The Artifacts array is not being created if the addon detects it as nil (in my case, because of me wiping the saved variables file) so I added the following to Line 17721 of AllTheThings.lua:

if not accountWideData.Artifacts then accountWideData.Artifacts = {}; end

I don't know if this is the intended fix but it does the trick.

I hope this helps!

commented

Thank you for being the 'cleared Saved Variables' tester :) I'll make the same change as it seems to have been missed.