Derma Images Problem

Hello today im getting some problems with my derma menu

every time i try to use my own image( i alredy converted it from png to vtf and created the VMT file) it dont shows the image instead it shows the annoying black and pink squares!

this is the code i was using

function OPEMNEUH()
local DImage2
local DImage1

DImage2 = vgui.Create(‘DImage’)
DImage2:SetSize(50, 50)
DImage2:SetPos(318, 184)
DImage2:SetImage(’’)
DImage2:SizeToContents()

DImage1 = vgui.Create(‘DImage’)
DImage1:SetSize(209, 308)
DImage1:SetPos(7, 59)
DImage1:SetImage(‘materials/menutexture/fondo.vtf’)
DImage1:SizeToContents()

end

concommand.Add(“openmenuh”, OPEMNEUH)
material vmt file

LightmappedGeneric
{
$basetexture menutexture\fondo
$surfaceprop gravel
}

Did you add the material with resource.AddFile?
**[Resource.AddFile

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Resource.AddFile)**

Also, for your vmt try this:



"UnlitGeneric"
{
"$basetexture" "menutexture\fondo"
"$surfaceprop" "gravel"
} 


And so people can read your code better:
[lua]function OPEMNEUH()
local DImage2
local DImage1

DImage2 = vgui.Create(‘DImage’)
DImage2:SetSize(50, 50)
DImage2:SetPos(318, 184)
DImage2:SetImage(’’)
DImage2:SizeToContents()

DImage1 = vgui.Create(‘DImage’)
DImage1:SetSize(209, 308)
DImage1:SetPos(7, 59)
DImage1:SetImage(‘materials/menutexture/fondo.vtf’)
DImage1:SizeToContents()

end

concommand.Add(“openmenuh”, OPEMNEUH)[/lua]

yeah i tired using resource.Addfile(“my material vmt file and my mat vtf file”)

but it still dont works

DImage1:SetImage(‘materials/menutexture/fondo.vtf’)

remove the materials/ part and the extension

so it would end up like this? DImage1:SetImage(‘menutexture/fondo’)

[lua]function OPEMNEUH()
local DImage2
local DImage1

DImage2 = vgui.Create(‘DImage’)
DImage2:SetSize(50, 50)
DImage2:SetPos(318, 184)
DImage2:SetImage(’’)
DImage2:SizeToContents()

DImage1 = vgui.Create(‘DImage’)
DImage1:SetSize(209, 308)
DImage1:SetPos(7, 59)
DImage1:SetImage(‘menutexture/fondo.vtf’)
DImage1:SizeToContents()

end

concommand.Add(“openmenuh”, OPEMNEUH)[/lua]

Yes, it would end up like that.

thanks now it works