Surface.SetTexture problem

Hey guys, I did whats in the GMod Wiki page, http://wiki.garrysmod.com/?title=Surface.SetTexture

I just copied the code to see if it works:
[lua] local tex = surface.GetTextureID(“Brick/brickfloor001a”) // Gets the texture id for the brick texture
local function drawBrickTexture()
surface.SetTexture(tex)
surface.SetDrawColor(255,255,255,255) // Makes sure the image draws with all colors
surface.DrawTexturedRect(ScrW()*0.5-32,ScrH()*0.5-32,64,64)
end
hook.Add(“HUDPaint”,“DrawTheBricks”,drawBrickTexture) [/lua]

But it doesnt seem to work correctly, since only a black square will appear in my screen, and if I look around, somtimes the texture becomes visible for around 1 second, is there any fix to this?

Set your texture’s VMT to UnlitGeneric.

Thanks, i’ll try it out.

[editline]07:24PM[/editline]

Now it pops up as a Black/Purple square in the middle… D:

Do you have the texture?

Show us your .vmt

Hmm, it isnt correct, can someone post the code for an UnlitGeneric .vmt file? Would be great.


"UnlitGeneric"
{
	"$basetexture" "path/to/material"
}


Thanks i’ll try it out soon