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.


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

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


    texx = surface.GetTextureID("some/other/texture.vmt")

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


edit: Nevermind. I feel stupid. [img_thumb] [/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().