Problem with Derma

DermaPanel = vgui.Create( “NPC2” )
DermaPanel:SetPos( 50,50 )
DermaPanel:SetSize( 200, 250 )
DermaPanel:SetTitle( “NPC2” )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )

I put this in serverside lua/autorun, upon restarting players get this error
[ERROR] lua/autorun/derma1.lua:2: attempt to index local ‘DermaPanel’ (a nil value)

  1. unknown - lua/autorun/derma1.lua:2

Your first line should be something like:
[lua]local DermaPanel = vgui.Create( “DFrame” )[/lua]

I did that and got exactly the same error.

[editline]17th December 2012[/editline]

NVM, it worked I just made a silly error. Is there a way I can change the colour of something in Derma?

Could you give me an idea on what you would like to change?

Also, you’re best off asking small questions like these in:

I want to change the colour of a DermaPanel and also wondering if DlImage has to be a .vtf

[lua] DermaPanel.Paint = function()
draw.RoundedBox( 8, 0, 0, DermaPanel:GetWide(), DermaPanel:GetTall(), Color( 0, 0, 0, 225 ) )

Try that, bare in mind I’m very new to lua so that may not be the best way to do it.