Material errors 'key value error'

Hi all, I have an error and I can’t seem to find any help online. So I am hope someone could help me out.

I am using .vtf/vmt images for my hud for my gamemode.

Here is my code:

init.lua

resource.AddFile(“materials/vgui/slayer/hud.vtf”)
resource.AddFile(“materials/vgui/slayer/hud.vmt”)

cl_init.lua

local hpsplat = Material("vgui/slayer/hud")

surface.SetMaterial(hpsplat)
surface.SetDrawColor(225, 225, 225, 225 )
surface.DrawTexturedRect(0, ScrH()-1080, 1920, 1100 )

It worked for like 5 mins then I got this in game error

KeyValues Error: LoadFromBuffer: missing { in file materials/vgui/slayer/timer.vmt

Error: Material “vgui/slayer/timer” uses unknown shader “<!DOCTYPE”

If you guys can help me out, I will be appreciative.

Thanks.

-Duby

Could you post the contents of your VMT?

“UnlitGeneric”
{
“$baseTexture” “vgui/slayer/hud”
“$translucent” “1”
“$ignorez” “1”
}

Remove the AddFile of the VTF. Adding the VMT should automatically add the VTF.

Would this ‘cure’ this error do you think?

Yea it hasn’t helped, so I still have this error!