quick question.

im getting an error (


[ERROR] addons/interaction menu/lua/autorun/client/cl_init.lua:236: attempt to index local 'menucolorer' (a nil value)



)

and im thinking its cause the colorer hasnt been made yet, what do you think? and how do i fix it? im thinking this cause it worked when i just copied and pasted the code from the wiki, and the panel was loaded immediantly insted of being loaded when the parent is loaded.


        local settingsframe = vgui.Create("DFrame")    settingsframe:SetSize(160,500)
    settingsframe:SetVisible( false )
    settingsframe:SetTitle( "Settings Menu" )
    settingsframe:ShowCloseButton( false )
    settingsframe:SetDraggable( true )
    settingsframe:SetPos (ScrW, ScrH)
    settingsframe:MakePopup ( false )
    settingsframe.Paint = function(s , w , h)


        draw.RoundedBox(20,0,0,w , h,Color(0,0,255))
        draw.RoundedBox(20,2,2,w-4 , h-4,Color(0,128,255))


    end


    local menucolorer = vgui.Create( "PanelColorPicker", settingsframe )
    menucolorer:SetPos( 35, 10 )
    menucolorer:SetSize( 30, 180 )
    function menucolorer:OnChange( col )
        settingsframe:SetBackgroundColor( col )
        frame:SetBackgroundColor( col )
    end




line 236 btw is this line:


	menucolorer:SetPos( 35, 10 )

PanelColorPicker doesn’t exist.
Here’s a list of VGUI elements that do:

and it works in game, when i put it in my lua folder and run it in singleplayer. no errors. its something i changed.

[editline]31st August 2016[/editline]

i got it to appear, time to make it change the panels color.

[editline]31st August 2016[/editline]

idk how to change it, i tried using the same method for the old thing i did (http://wiki.garrysmod.com/page/DRGBPicker/OnChange) but it wont change. code.


	local Mixer = vgui.Create( "DColorMixer", settingsframe )
	Mixer:SetSize( 267, 186 )
	Mixer:SetPos( 20, 200 )		--Make Mixer fill place of Frame
	Mixer:SetPalette( true ) 		--Show/hide the palette			DEF:true
	Mixer:SetAlphaBar( true ) 		--Show/hide the alpha bar		DEF:true
	Mixer:SetWangs( true )			--Show/hide the R G B A indicators 	DEF:true
	Mixer:SetColor( Color( 255, 0, 55 ) )	--Set the default color
	function Mixer:OnChange( col )

		settingsframe:SetBackgroundColor( col )
		frame:SetBackgroundColor( col )