Seperate Files.

Having trouble with getting my cl_hud.lua to run. What are the includes or w/e is needed?

Where are you putting it in?

Just with the main 3 files.

I have no idea what that is supposed to mean. Are we talking about gamemode? Are you including the file with include()? Are you adding it with AddCSLuaFile() on server?

Yes, this is a gamemode. cl_hud is with cl_init, init and ofc shared. I’ve AddCSLuaFile() and included in the init file.

You include it from cl_init.lua. Make sure you got all the base includes and addcsluafile calls for shared and cl_init too.

I’ve already added the includes. Just none for the cl_hud as I don’t know where you include it.

I just told you where you include it.

Take a look at my skeletonized dev-base. Basically it is an autoloader with new hooks, helper-functions, and more AND I’m adding more to it. I’m gearing up for a new release very soon which will include a networking system, fileio and an sql query builder ( super easy to use ).

Take a look at the Src link, and look in the documentation folder. It’ll highlight the added functions, hooks, and how to use the file-structure and autoloader features. Basically, you’ll never need to use an include or AddCSLuaFile again; it does all of that for you with file-name override support and unlimited nested directory support with realm override using folder-names too ( filenames have last say ). This might be something helpful to you. I also tutor people if you’re willing to learn, feel free to add me on Steam.

If you want something to make development easier: Please look into AcecoolDev_Base, a skeletonized-developer-base game-mode which features an autoloader ( to ignore ever needing to use include or AddCSLuaFile ever again, plus a range of useful console commands to force the game-mode to refresh “loadgm”, and to easily changelevel “relevel/remap <Current Map OR optionally mapname> <Current GM OR optionally gamemode>” ), many new and useful hooks, many helper-functions, many metatable “classes”, and much more.

It is recommended that you use a form of GIT/SVN software to allow for easy updating.
Src: https://bitbucket.org/Acecool/acecooldev_base/src/
Issue-Tracker: https://bitbucket.org/Acecool/acecooldev_base/issues/
Pull-Requests: https://bitbucket.org/Acecool/acecooldev_base/pull-requests/
Wiki: https://bitbucket.org/Acecool/acecooldev_base/wiki/Home/