Trying to make a paint derma but it doesn't work

Hello, i am trying to make a derma object that you can paint on but err … it doesn’t work. Here is the code :

[LUA]
local PANEL={}

function PANEL:Init()
self.PrimeBase = { }

local function MakeRandomName()
	
	local str = "_"
	local tab = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x", "y", "z" }
	
	for i=1 , math.random( 10 , 20 ) do
	
		str = str .. table.Random( tab )
		
	end
	
	return str

end


hook.Add( 'Think', 'DPaint : ' .. MakeRandomName() , function()
	self:Paint()
end)

end

function PANEL:Paint()
draw.RoundedBox(6,0,0,self:GetWide(),self:GetTall(),Color(255,255,255,255));
for X,tab in pairs( self.PrimeBase ) do
for Y,color in pairs( tab ) do
draw.RoundedBox(2,X,Y,5,5,color);
end;
end;
return true;
end;

function PANEL:Painted()
return self.PrimeBase;
end;

function PANEL:SetChosenColor( color )
self.CColor = color;
end;

function PANEL:SetPainted( tab )
self.PrimeBase = tab
end

function PANEL:SaveImage( dir )
file.Write( dir…’.txt’ , util.TableToKeyValues(self.PrimeBase ));
end;

function PANEL:LoadImage( dir )
self:SetPainted( util.KeyValuesToTable(file.Read( dir ) ) );
end;

function PANEL:OnMousePressed()
local x, y = gui.MousePos();
if !self.PrimeBase[ x ] then self.PrimeBase[ x ] = { } end;
self.PrimeBase[ x ][ y ] = self.CColor;
end;

vgui.Register( “DPaint”, PANEL );

– TESTER

concommand.Add( ‘Test00101’ , function()
local DPanel1
local DFrame1

DFrame1 = vgui.Create('DFrame')
DFrame1:SetSize(330, 195)
DFrame1:SetPos(166, 145)
DFrame1:SetTitle('Untitled DFrame')
DFrame1:SetSizable(true)
DFrame1:SetDeleteOnClose(false)
DFrame1:MakePopup()

DPanel1 = vgui.Create("DPaint")
DPanel1:SetParent(DFrame1)
DPanel1:SetSize(326, 169)
DPanel1:SetPos(2, 24)
DPanel1:SetChosenColor( Color( 255, 0, 0, 255 ) )

end)
[/LUA]

it works, but doesnt update after :?

The code is not showing up for me, and rember me? it’s AmB Dan

FYI : There is a bug with internet explorer and doesn’t show the code. Try using firefox or something.

[ Off-Subject ] : I really don’t want to have anything in common with a dirty rascal who steals my code whenever he can. But seeing as that was before i was on facepunch, i think i will drop that subject ( i wasn’t flamming, i was expressing myself poeticly :3 )