Discord
Steam
/
Garry's Mod
/
Help
/
HUD Error
Login/Join
Event Log
HUD Error
0 replies, posted
Search
In This Thread
Hello guys !, i thought it was a gmod bug, but then i notice that it was my hud :/, i'm not getting errors, my screen go black and then gmod close, the same thing happend to my friend when he join my server, but then he said wait, i have an error and show me this: [code] Couldn't SteamMountFilesystem depotid 440.441 [ SteamMountFilesystem(7868,441,0x2436f680=,0x2436f570) failed with error 116: Cache nee [/code] If someone can help me please? This is my hud ( the part that make gmod crash ) [code] function clr( color ) return color.r, color.g, color.b, color.a end function DrawRectangle( x, y, w, h, color ) surface.SetDrawColor( color ) surface.DrawRect(x, y, w, h ) end function DrawBox( x, y, w, h, color, fill ) surface.SetDrawColor( color ) surface.DrawOutlinedRect( x, y, w, h ) DrawRectangle( x+1, y+1, w-2, h-2, fill ) end function DrawText( x, y, text, font, color ) surface.SetFont( font ) surface.SetTextPos( x, y ) surface.SetTextColor( clr( color ) ) surface.DrawText( text ) end local function formatNumber(n) n = tonumber(n) if (!n) then return 0 end if n >= 1e14 then return tostring(n) end n = tostring(n) sep = sep or "," local dp = string.find(n, "%.") or #n+1 for i=dp-4, 1, -3 do n = n:sub(1, i) .. sep .. n:sub(i+1) end return n end function NewHud( ) surface.CreateFont( "CusNameText", { font = "Tahoma", size = 26, weight = 500, antialias = true } ) surface.CreateFont( "CusDescText", { font = "Tahoma", size = 12, weight = 1000, antialias = true } ) -- =========================================================================================================== local hp = LocalPlayer():Health() local ply = LocalPlayer() local text2 = "Health: "..hp local AP = LocalPlayer():Armor() local text3 = "Shield: "..AP local v3 = LocalPlayer().DarkRPVars.job if not v3 then v3 = "" end if v3 == nil then v3 = "" end local text4 = "Job: " local v1 = formatNumber(LocalPlayer().DarkRPVars.money) if not v1 then v1 = "" end local text5 = "Money: " local v2 = LocalPlayer().DarkRPVars.salary if not v2 then v2 = "" end local text6 = "Salary: " local ply = LocalPlayer() local v7 = formatNumber(ply:PS_GetPoints()) local text7 = "Shop Points: " -- =========================================================================================================== if (ply:Alive()) then --- ============================================ Player Health Hud ======================================== DrawBox( ScrW()* 0.152777777, ScrH()*0.977, ScrW() * 0.10625, 17, Color( 255, 0, 0, 255 ), Color( 200, 100, 100, 255 )) DrawRectangle( ScrW()* 0.152777777, ScrH()*0.977, (1.53*(math.Clamp(hp, 0, 100)/100))*100, 17, Color( 255, 0, 0, 100 )) DrawText( ScrW() * 0.145138888,ScrH()*0.974, text2, "CusDescText", Color( 0, 0, 0, 255 )) DrawText( ScrW() * 0.14583333 ,ScrH()*0.974, text2, "CusDescText", Color( 240, 240, 240, 255 )) --- ======================================================================================================= --- ============================================ Player Shield Hud ======================================== DrawBox( ScrW() * 0.27083333, ScrH()*0.977, ScrW() * 0.10625, 17, Color( 0, 0, 240, 255 ), Color( 100, 100, 200, 255 )) DrawRectangle( ScrW() * 0.27083333, ScrH()*0.977, (1.53*(math.Clamp(AP, 0, 100)/100))*100, 17, Color( 0, 0, 255, 100 )) DrawText( ScrW() * 0.26319444, ScrH() * 0.974, text3, "CusDescText", Color( 0, 0, 0, 255 )) DrawText( ScrW() * 0.2638888, ScrH() * 0.974, text3, "CusDescText", Color( 240, 240, 240, 255 )) --- ======================================================================================================= --- ============================================ Player Job Hud =========================================== DrawBox( ScrW() * 0.3888888, ScrH()*0.977, ScrW() * 0.10625, 17, Color( 191, 127, 0, 255 ), Color( 109, 109, 109, 255 )) DrawText( ScrW() * 0.38125, ScrH() * 0.974, text4, "CusDescText", Color( 0, 0, 0, 255 )) DrawText( ScrW() * 0.3819444, ScrH() * 0.974, text4, "CusDescText", Color( 240, 240, 240, 255 )) DrawText( ScrW() * 0.4027777, ScrH() * 0.979, v3, "CusDescText", Color( 255, 255, 255, 255 )) --- ======================================================================================================= --- ========== =================================== Player Money Hud ======================================== DrawBox( ScrW() * 0.5138888, ScrH()*0.977, ScrW() * 0.10625, 17, Color( 255, 191, 0, 255 ), Color( 109, 109, 109, 255 )) DrawText( ScrW() * 0.50625, ScrH() * 0.974, text5, "CusDescText", Color( 0, 0, 0, 255 )) DrawText( ScrW() * 0.50694444, ScrH() * 0.974, text5, "CusDescText", Color( 240, 240, 240, 255 )) DrawText( 720, ScrH() * 0.979, v1, "CusDescText", Color( 255, 255, 255, 255 )) --- ======================================================================================================= --- =================================================== Salary Hud ======================================== DrawBox( ScrW() * 0.63194444, ScrH()*0.977, ScrW() * 0.10625, 17, Color( 0, 127, 127, 255 ), Color( 109, 109, 109, 255 )) DrawText( ScrW() * 0.62430555, ScrH() * 0.974, text6, "CusDescText", Color( 0, 0, 0, 255 )) DrawText( ScrW() * 0.625, ScrH() * 0.974, text6, "CusDescText", Color( 240, 240, 240, 255 )) DrawText( 940, ScrH() * 0.979, v2, "CusDescText", Color( 255, 255, 255, 255 )) --- ======================================================================================================= --- ============================================== Shop Points Hud ======================================== DrawBox( ScrW() * 0.75, ScrH()*0.977, ScrW() * 0.10625, 17, Color( 255, 93, 0, 255 ), Color( 109, 109, 109, 255 )) DrawText( ScrW() * 0.742361111, ScrH() * 0.974, text7, "CusDescText", Color( 0, 0, 0, 255 )) DrawText( ScrW() * 0.7430555, ScrH() * 0.974, text7, "CusDescText", Color( 240, 240, 240, 255 )) DrawText( 1200, ScrH() * 0.979, v7, "CusDescText", Color( 255, 255, 255, 255 )) --- ======================================================================================================= end end /*--------------------------------------------------------------------------- Drawing the HUD elements such as Health etc. ---------------------------------------------------------------------------*/ local function DrawHUD() GunLicense() NewHud() Agenda() DrawVoiceChat() LockDown() Arrested() AdminTell() DrawBox( ScrW()*0, ScrH()*0.97, ScrW()*1, ScrH()*1, Color( 50, 50,50, 255 ), Color( 100, 100,100, 125 ) ) end [/code] Thanks :(
Sorry, you need to
Log In
to post a reply to this thread.