Why an addon has an empty table on game load - Lua/Addon Creation

hi all,

I’ve started working on building an addon but I’m seeing some strange behaviour, mostly when the game loads and the character logs in (events PLAYED_LOGIN and ADDON_LOADED) I see empty tables, even though my functions to trigger loading of the data are pulled.

This mostly happens when I use Exit Game, or have been logged out for a long time eg overnight. I’m using events PLAYER_LEAVING_WORLD and PLAYER_LOGOUT to save data manually, although I’ve not confirmed it I believe saving is done without needing to call out a savedata function?

If anyone has any thoughts on this behaviour or how to accurately debug it I would be so grateful.

Would probably help if you post the relevant code blocks (stick them between ```code``` so the forums don’t smartquote etc.)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.