draw.TexturedQuad is showing the "missing texture" texture
3 replies, posted
I'm trying to draw a material on my hud, using draw.TexturedQuad. Here's the code I am using:
[lua]
draw.TexturedQuad({x = 30, y = (ScrH() - 340) + (55*(k-1)), w = 50, h = 50, texture = surface.GetTextureID(string.lower(v.Species).."-i")})
[/lua]
In game, however, it's showing the purple and black squares texture.
The file path is correct, because the console isn't saying "--- Missing Vgui material."
Can anyone help?
The texture "string.lower(v.Species)-i" does not exist. Try printing that string to see what it is, and then compare it with the material you're trying to draw.
[QUOTE=Entoros;24246231]The texture "string.lower(v.Species)-i" does not exist. Try printing that string to see what it is, and then compare it with the material you're trying to draw.[/QUOTE]
I've already done that. If the root folder is materials, then it's the right path. Also, doesn't it show white if the texture doesn't exist?
bump.
Sorry, you need to Log In to post a reply to this thread.