From 839b0d928c0cfee28e4ece37bdffe0120df6ff6a Mon Sep 17 00:00:00 2001 From: Tom O'Sullivan Date: Wed, 25 Nov 2020 00:23:41 +0000 Subject: [PATCH] Fix the colour type --- sh_messagepack.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sh_messagepack.lua b/sh_messagepack.lua index f0c0588..122d53f 100644 --- a/sh_messagepack.lua +++ b/sh_messagepack.lua @@ -26,6 +26,13 @@ local ldexp = math.ldexp local huge = math.huge local tconcat = table.concat +local oldType = type +local isColor = IsColor +local function type(var) + if isColor(var) then return "Color" end + return oldType(var) +end + local function argerror(caller, narg, extramsg) error("bad argument #" .. tostring(narg) .. " to " .. caller .. " (" .. extramsg .. ")") end