I have a lua error, i don"t understand.

Hi man, i have an lua error pleas help me.

my code :


include("sh_cp.lua")

local conf = CPCONF

local function EMERGENCY(ply, args)
	if args == "" then
		DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("invalid_x", "argument", ""))
		return ""
	end

	local DoSay = function(text)
		if text == "" then
			DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("invalid_x", "argument", ""))
			return
		end
		for k, v in pairs(player.GetAll()) do
			if v:isCP() or v == ply then
				DarkRP.talkToPerson(v, team.GetColor(ply:Team()), conf.tchatmsg ..ply:Nick(), Color(255,0,0,255), text, ply)
			end
		end
	end
	return args, DoSay
end
DarkRP.defineChatCommand(conf.cmd, EmergencyC, 1.5)


DarkRP.declareChatCommand{
	command = conf.cmd,
	description = "Ask an Emergency",
	delay = 1.5
}


function MsgAuto()
    if AutoMSG then
        for k, v in pairs(player.GetAll()) do
	     v:ChatPrint( conf.AnoMsg )
        end
    end
  end

timer.Create( "automsg", conf.TimeMsg, 0, MsgAuto)

and



-- CONFIG CP CMD
 
AutoMSG = true

CPCONF = { 
	tchatmsg = " [Emergency] ",
	cmd = "emergency",
	TimeMsg = "600", 
	AnoMsg = "An emergency? /emergency <message > to call the cops.",

}

Lua error :
[ERROR] gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:17: attempt to call upvalue ‘callback’ (a nil value)

  1. callback - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:17
  2. RP_PlayerChat - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:68
    3. unknown - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:132

Thank’s you. Good night.

Where is EmergencyC defined? Post the code for it.

Thank’s you !