Derma Skin (Texture Drawing)

Basically, I’m trying to draw a texture on a panel with a skin, if the player’s class is == to something, else, draw something else. Instead, neither textures get drawn.

[lua]

local SKIN = {}
function SKIN:DrawGenericBackground( x, y, w, h, color )

    /* MAT */
if LocalPlayer():GetNWFloat("class")!=nil then texx=surface.GetTextureID(LocalPlayer():GetNWFloat("class")) 

    else 

    texx = surface.GetTextureID("some/other/texture.vmt")
end
surface.SetTexture(texx)
surface.DrawTexturedRect(x,y,w,h)

end
derma.DefineSkin( “skin”, “Oh my. A skin. RUNN!!.”, SKIN )

[/lua]

edit: Nevermind. I feel stupid. [img_thumb] http://i54.tinypic.com/102mtrt.gif [/img_thumb]

Just a tip, even though you solved it, looking up textures every frame is really bad. -20 FPS bad. Define it locally above the function, so you can reference a variable without having to use Material() or surface.GetTextureID().