View Single Post
03/22/15, 06:04 AM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 578
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:
  1. local function DoesScriptNameExist(scriptName)
  2.     local scripts = CLICK4INFO.sv.scripts
  3.     for _, script in ipairs(scripts) do
  4.         if script.scriptName == scriptName then
  5.             return true
  6.         end
  7.     end
  8.     return false
  9. end

CU
  Reply With Quote