dmodelpanel.lua:133: attempt to perform arithmetic on field 'r' (a nil value)

Everytime i open up CoffeeInventory i get this:

[ERROR] lua/vgui/dmodelpanel.lua:133: attempt to perform arithmetic on field ‘r’ (a nil value)

  1. unknown - lua/vgui/dmodelpanel.lua:133

CoffeeInventory incorrectly uses SetColor or something.

Hmm i modified it so i can render Farm System Fruits correctly!

[editline]19th September 2015[/editline]

i added this
itemModel:GetEntity():SetSkin(item.skin or 0)
if item.mat then itemModel:GetEntity():SetMaterial(item.mat) end
itemModel:SetColor(item.color or Color(255,255,255,255))
MsgN(item.color or Color(255,255,255,255))

[editline]19th September 2015[/editline]

Aww i get that
0
table: 0x33a9d960
0
instead of something like “XXX XXX XXX” or “255 0 255”

hmm what could cause that