Help needed on HUD

well this is the code that gives me an error.


function good_hud:PaintPanel( x, y, w, h, colors )
 
	surface.SetDrawColor( clr( colors.border ) );
	surface.DrawOutlinedRect( x, y, w, h );
 
	x = x + 1; y = y + 1;
	w = w - 2; h = h - 2;
 
	surface.SetDrawColor( clr( colors.background ) );
	surface.DrawRect( x, y, w, h );
 
end

error =



Hook 'PaintOurHud' Failed: *********/gamemode/cl_init.lua:134: attempt to index local 'colors' (a nil value)


line “134” = function good_hud:PaintPanel( x, y, w, h, colors )

You didn’t specify “colors” when you called :PaintPanel.

How do i specify colors then?


local function clr( color ) return color.r, color.g, color.b, color.a; 

end 

this is in it to

[editline]06:52PM[/editline]

it’s fixed , i mistyped a redirection somewhere