Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local nameToCheck = match[2] -- Use match instead of matches
- -- Function to check if the name exists in the targetTable
- local function containsName(table, name)
- -- Convert both keys to lowercase for case-insensitive comparison
- local lowerName = string.lower(name)
- for key, _ in pairs(table) do
- print("Checking key:", key)
- if string.lower(key) == lowerName then
- return true
- end
- end
- return false
- end
- -- Checking if the name exists in the targetTable
- if containsName(arc.targetTable, nameToCheck) then
- cecho("\npretend I'm shadow vortex")
- cecho("\npretend I'm shadow vortex")
- cecho("\npretend I'm shadow vortex")
- else
- -- Print a message if the name doesn't exist
- cecho("\nThe name does not exist in the targetTable")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement