View Single Post
03/21/19, 09:50 AM   #24
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
Nope, the filename of the SavedVars is defined via the foldername and manifest TXT filename of your addon.
None of your addons's tables or variable names has an impact on the addon's "name and SV filename for the game" itsself.

Foldername and txt name = "AddonTest1" -> SavedVariables filename AddonTest1.lua
In your AddonTest1.txt is defined the usage of your file main.lua
In the main.lua is defined the global variable:
AddonTest1 = AddonTest1 or {}
AddonTest1.name = "AddonTest 1 Name"
Filename of the SV -> Still AddonTest1.lua and not "AddonTest 1 Name.lua"

The variable "AddonTest1 in your addon is just used internally in your addon. You can access it from your addon, your addon's other files and other addons (as it is global). But the game won't need this information for loading the manifest TXT filename or building the SavedVariables\<manifest TXT filename>.lua file

Edit:
I've updated my last post about SVs on the 1st page of this thread!

Last edited by Baertram : 03/21/19 at 09:55 AM.
  Reply With Quote