Problem with command code

Hi. So I try to make code to rp command /do and all time show me lua error.
Here is code


local function DO(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
        if GAMEMODE.Config.alltalk then
            for _, target in pairs(player.GetAll()) do
                DarkRP.talkToPerson(target, Color(178, 144, 0, 255), msg,  ply:Nick())
            end
        else
            DarkRP.talkToPerson(ply, Color(178, 144, 0, 255), msg,   ply:Nick())
        end
    end
    return args, DoSay
end


I want it to looks like on chat:
[yellow color]Bla bla bla(nickname)
If someone help me with that, I would be grateful.

-snippety snip, honest mistakes can be made, multiple times in a row in fact–