Steam – Garry’s mod: place addons in subfolder

garrys-modmodssteam-workshop

I am trying to organize my addons a little, because I don't know what's what anymore. I would like to place weapons in a weapons subfolder for example, having them all in different subfolders (e.g. a folder for lightsabers, a folder for shrink gun, …) by using GMAD extractor and then placing them inside of this "weapons folder", as shown in the image below.

enter image description here

I tried doing this by adding an autorun lua file in my "weapons" subfolder and just loading all other autoruns inside the separate folders (lightsabers, shrink gun, …), but this isn't working. This is my "autorun" code:

include "weapons/lightsabers/lua/autorun/rb655_lightsaber.lua"
include "weapons/lightsabers/lua/autorun/rb655_lightsaber_presets.lua"

Any ideas on how I can organize my addons the way I want them to be organized?

Best Answer

The documentation for the include function reveals that (since it's a function in Lua) the path names must be enclosed by parentheses.

Therefore, your code should look something like this.

include("weapons/lightsabers/lua/autorun/rb655_lightsaber.lua")
include("weapons/lightsabers/lua/autorun/rb655_lightsaber_presets.lua")