Saved variables are not loaded when the client loads your addon files. The variables are loaded after. You need to wait at least until the ADDON_LOADED event fires, PLAYER_LOGIN is fine.
Also, your code has a few discrepancies:
HideMicroMenuDBPC does not interact with your two boolean saved variables.
That table object is not a frame, so it will never trigger the PLAYER_LOGIN function.
The frame object "Frame" you did register PLAYER_LOGIN to is not used anywhere else.
|