Gamemode files fail to load at complete random

i host a server and out of nowhere, for random people (everybody except me it seems because i’ve never encountered it), things will break and it always seems to be clientside files that fail to load for some reason.

Couldn't include file 'cl_hud.lua' (File not found) (@gamemodes/hell/gamemode/cl_init.lua (line 45))

[ERROR] gamemodes/hell/gamemode/cl_scoreboard.lua:109: 'CombineControl.LabelSmall' isn't a valid font

  1. SetFont - [C]:-1
   2. unknown - gamemodes/hell/gamemode/cl_scoreboard.lua:109

[ERROR] gamemodes/hell/gamemode/shared.lua:542: 'CombineControl.ChatNormal' isn't a valid font

  1. SetFont - [C]:-1
   2. FormatLine - gamemodes/hell/gamemode/shared.lua:542
    3. AddChat - gamemodes/hell/gamemode/cl_chat.lua:14
     4. OOC - gamemodes/hell/gamemode/sh_chat.lua:801
      5. func - gamemodes/hell/gamemode/sh_chat.lua:123
       6. unknown - lua/includes/extensions/net.lua:32

i have absolutely zero clue why this happens as there’s nothing that points to a cause, the fonts are valid for about 95% of everyone that joins (it’s not a matter of the font file not existing because if I restart the server, it then works fine), the cl_hud file for whatever reason fails to load. i’m stumped.

this seems to be solely a UI issue, as well, as more errors are becoming apparent still related to fonts.

You must do AddCSLuaFile on the server before you try include it on the client. If you are already doing this just make sure the server adds it as a client file before the client attempts to include it.

Edit: If there are any errors the file won’t load. If your clients are missing content such as models it can give off errors if you try use these models which would explain why it happens on certain clients.

both of these conditions are met. this will happen when there are no errors of any type and the file is included on the server first.

[editline]27th February 2017[/editline]

oops wait a minute. trying to include them on the client is actually referenced before AddCSLuaFile’ing them on the server is. will change to see if that fixes it.

Are you doing a lot with autorefresh? After enough reloads that seems to provoke the client to stop downloading random files.

yeah i often make updates to the code. i pictured that would be exactly the problem, god damn it.

[editline]28th February 2017[/editline]

is there anything else that can cause this?