• Problem with custom function
    0 replies, posted
I have some problem with my custom function Here function code: Azarath_Acces_Groups = {} function AzarathCreateAccesGroup(name,usergroup,blackorwhite,commandlist) if name == "" then return false end if not blackorwhite == "white" or not blackorwhite == "black" then return false end if #commandlist < 1 then return false end local tab = {} tab.name = name tab.usergroup = usergroup tab.blackorwhite = blackorwhite tab.commandlist = commandlist local groupexist = false for k,v in pairs(Azarath_Acces_Groups) do if Azarath_Acces_Groups[k].name == name then groupexist = true end end if not groupexist then table.insert(Azarath_Acces_Groups,tab) end end I wan't to check if group exist don't add to table Code I ran: AzarathCreateAccesGroup( "superadmin", --Name of group "superadmin", --Name of acces group in Azarath "white", -- This command in white list or in black list {"setPos"} --Commands ) Help plz to solve problem
Sorry, you need to Log In to post a reply to this thread.