Anyone have any ideas on this.
Whenever the function
(below) runs and adds the scriptName & script to the scripts table...and then I try to reload the UI
(or just wait long enough) the game crashes & the saved variable file is over 1 gig.
That is the only line of code that adds anything to the saved variables file.
Code Paste here, Line 392 is the problem:
http://pastebin.com/sjnG4v9d
Or if you want/need to see the whole addon you can find it here:
Drop Box Zip File
CLICK4INFO.sv -- Is my saved variables
CLICK4INFO.sv.scripts -- Is just an empty table to start out.
Lua Code:
function Click4Info_AddScript(self)
local scriptName = CLICK4INFO.nameEditBox:GetText()
local script = CLICK4INFO.scriptEditBox:GetText()
if not scriptName or scriptName == "" then return end
if not script or script == "" then return end
-- This Msg only prints once
-- so its not infinitely looping this function
debugMsg("Adding Script")
-- check to see if it already exists
if not DoesScriptNameExist(scriptName) then
-- This line is the problem:
table.insert(CLICK4INFO.sv.scripts, {["scriptName"] = scriptName, ["script"] = script})
end
end