I think the problem is the DoesScriptNameExist function.
CLICK4INFO.sv.scripts is a indexed table (using table.insert)
The function should be like this:
Lua Code:
local function DoesScriptNameExist(scriptName)
local scripts = CLICK4INFO.sv.scripts
for _, script in ipairs(scripts) do
if script.scriptName == scriptName then
return true
end
end
return false
end
CU