Chat Command Erroring

[lua]
function EAM.HandleUseCmd(ply,txt,team)
local exp = string.Explode(" ",txt)
if string.Left(exp[1],1) == “!” then
local cmd = string.Right(exp[1],tonumber(string.len(exp[1]))-1)
print(cmd)
local m = {}
if #exp > 10 then ply:ChatPrint(“Too many arguments passed.”) end
for a,b in pairs(EAM.Plugins) do
if b:UseCmd() == cmd then
table.Add(m,b)
break
end
end
if #m == 0 then ply:ChatPrint(“This is not a valid command.”) return end
m[1]:Use(ply,exp)
return false
end
end
hook.Add(“PlayerSay”,“HandleUseCmd”,EAM.HandleUseCmd)
[/lua]

Error



Attempt to index local 'b' (a boolean value)


Ask for additional functions if needed.

Post the EAM.Plugins table.