![]() ![]() For the addon, a nil SavedVariable indicates "first load", effectively resetting the addon's settings entirely.įinally, once the interface is unloaded for the next time, this default configuration will be written to the SavedVariables file, overwriting any portions of the previous settings that might've been left. When the interface is loaded for the next time, this will cause a syntax error to occur when loading the SavedVariable file, causing its content to be skipped for execution, leaving the SavedVariable(s) nil. This will cause the file to have incomplete Lua syntax (usually cut off in the middle of a table definition). ![]() The issue here arises when the client unexpectedly dies while writing one of the SavedVariables files. Thus, on interface load, the client only has to load these Lua files as if they were scripts, re-populating the global variables with the saved values stored in valid Lua syntax. When the interface is unloaded, the client loops through the SavedVariables names as listed in the TOC file, then formats the content of the globals with that name into valid Lua syntax and writes this Lua syntax into the SavedVariables files in the WTF folder you may be familiar with. This is due to the way WoW handles SavedVariables (your stored configuration). The issue that occurs if WoW crashes while writing addon settings is not limited to WA, but can happen to any addon. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |