Closed nwferreri closed 1 month ago
I'm not a developer but I've encountered this myself, and I believe it's because there's no data available for the character when you enable it in this way, so it throws an error. Most WoW addons write info to their config or data files either when you login or when you logout, but a reload from the Addon window just reloads the UI and any enabled addons. It doesn't do what's needed to create the datastore entry for the user in question. Since Altoholic requires basic character info to be present in the Datastore when opening the window, you get an error when this data isn't present.
As you've noted, the solution is to logout and then login, or enable the addon from the character selection screen. Not sure if this is something the dev can fix, since it's more to do with behaviour related to doing a reload as opposed to login/logout.
I definitely understand that, but I swear I used to be able to load Altoholic after already logging in.
Won't fix. The add-on, being a more complex structure than other add-ons, relies on events triggered at logon. Failing to do so causes such errors. It is highly recommended to keep it active all the time (all Altoholic_xx use no memory, they are Load-on-demand).
I totally get that. Maybe you could add a message that this is how the addon works to the addon's curse page to let people know. I wonder too if there's a way to display a message in game instead of throwing a bug. Would be less confusing for people.
This problem is a bit complicated, but it's consistent from all the various ways that I've tested it. If I log in to a character that doesn't have Altoholic enabled and then enable it with a UI reload, it breaks the addon.
Here's a screenshot of what the panel looks like when this happens.
Here's the error that pops up with no other addons enabled (except Addon Control Panel):
Sometimes, the list of strings in the error change if the error happens multiple times in a session or if other addons are enabled, but the error always starts with
DataStore_Characters/DataStore_Characters.lua:215: bad argument #3 to 'format' (string expected, got nil)
.If I then log out and log back in on that same character, Altoholic works correctly. I've also determined that if I enable Altoholic from the Addon menu on the character selection screen, and then log in to a character, it avoids this problem. So it seems like there's a problem when the addon isn't already enabled when you log in.