1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-09-20 19:29:44 +00:00

Merge pull request #381 from Wilma456/colerror

Better Error for "Invalid color"
This commit is contained in:
Daniel Ratcliffe 2017-07-25 19:56:59 +01:00 committed by GitHub
commit 94613d28a6

View File

@ -274,7 +274,7 @@ function create( parent, nX, nY, nWidth, nHeight, bStartVisible )
if type( color ) ~= "number" then
error( "bad argument #1 (expected number, got " .. type( color ) .. ")", 2 )
elseif tHex[color] == nil then
error( "Invalid color", 2 )
error( "Invalid color (got " .. color .. ")" , 2 )
end
nTextColor = color
if bVisible then
@ -321,7 +321,7 @@ function create( parent, nX, nY, nWidth, nHeight, bStartVisible )
if type( color ) ~= "number" then
error( "bad argument #1 (expected number, got " .. type( color ) .. ")", 2 )
elseif tHex[color] == nil then
error( "Invalid color", 3 )
error( "Invalid color (got " .. color .. ")", 2 )
end
nBackgroundColor = color
end