shared.lua breaks server & client side

Hello Facepunch,
I wanted to try myself on an own custom inventory system, want tried to make the “main” var (INV) globally shared, and include the file both in the client and server, console doesnt give errors, but ANY client/Serverside doesnt get run, I can print etc fine in the shared file though - note: even though I also include a 2nd shared file “items.lua”, I have to include shared.lua in the items file too, else it gives “INV Unknown blah blah” error.
Heres the top of my files:

Server:



AddCSLuaFile("../client/cl_init.lua")
AddCSLuaFile("../shared.lua")
AddCSLuaFile("../items.lua")

include("../items.lua")
include("../shared.lua")

util.AddNetworkString("w_inventory_open")
util.AddNetworkString("w_inventory_giveitem")
util.AddNetworkString("w_inventory_removeitem")
util.AddNetworkString("w_inventory_saveditems")


Client:



include("../items.lua")
include("../shared.lua")


Shared:



INV = {}
INV.Config = {}

INV.Config.EnableKeyBind = true


And in the items, theres literally just currently an “INV:HasItem()” check, and the include of the shared file.

As I said, any code ran client/serverside wont work - not even print for debug, including just print(“test”) or print(INV.Config.EnableKeyBind), both wont output anything at all - no errors client/serverside; tested on an locally hosted dedicated server.
File structure is like this:

/lua/
–> /client/
----> cl_init.lua
–> /server/
----> init.lua
–> /items/
----> EMPTY, NOT USED YET
–> shared.lua
–> items.lua

I’d like to get this fixed, since it literally gives me a headache, I thought about having somehow a “return end” in the shared file, which stops the others from running, but no, thats the only code:



local PLAYER = FindMetaTable("Player")

function PLAYER:EyeTrace(dist)
	local tr = {}
	tr.start = self:GetShootPos()
	tr.endpos = tr.start + (self:GetCursorAimVector() * dis)
	tr.filter = self
	tr = util.TraceLine(tr)
	return tr
end


I hope you can help me…somehow… I had this error already with an different addon, where client/serverside also didnt want to work.

Source.

but why doesnt it work with the normal “autorun” structure?