permission = { "LimitedLogic", "Danglt","DevLogixx","name1","name2","name3","name4","name5" }
local prefix = ";"
function admincatted(msg, speaker)
for i = 1,#permission do
if (string.upper(speaker.Name) == string.upper(permission[i])) then
msg = msg:gsub("/e ", "")
if msg:lower():sub(1, 5) == "part" ..prefix then
print("future command")
end
elseif msg:lower():sub(1,4) == "gui" ..prefix then
print("yes")
end
end
print("future command 2")
end
if msg:lower() == "prefix?" then
game.Chat:Chat(speaker.Character, "The prefix is: '"..prefix.."'")
elseif msg:lower():sub(1, 6) == "admin" ..prefix then
local plr = msg:sub(7)
game.Chat:Chat(speaker.Character, "Made "..plr.." A Admin")
table.insert(permission, plr)
end
COMMUNITY QUESTION
Attempted to index global 'msg' (a nil value) how do i fix?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
use local variables & properly indent pls
oh my god...