fix(server/addCommand): nil command name on error

This commit is contained in:
Linden
2023-04-01 11:25:57 +11:00
parent b7c32aacba
commit 389ed5263d

View File

@@ -49,7 +49,7 @@ local function parseArguments(source, args, raw, params)
end end
if not value and (not param.optional or param.optional and arg) then if not value and (not param.optional or param.optional and arg) then
return Citizen.Trace(("^1command '%s' received an invalid %s for argument %s (%s), received '%s'^0"):format(raw:match('/([^ ]+) '), param.type, i, param.name, arg)) return Citizen.Trace(("^1command '%s' received an invalid %s for argument %s (%s), received '%s'^0\n"):format(string.strsplit(' ', raw) or raw, param.type, i, param.name, arg))
end end
arg = value arg = value