Problems with custom gamemode

These last days I started coding a bit and started creating a gamemode. I have encountered some problems but there is a major problem that I have yet to find a solution to. Here’s my 3 files:

init.lua :

AddCSLuaFile( "cl_init.lua" )

cl_init.lua :


shared.lua :


GM.Name = "BuildWar"

function GM:Initialize()


gamemode file :

	"base"		"sandbox"
	"title"		"BuildWar"
	"author"	"CA"

When I load the gamemode and I join, I can’t use the spawn menu, my physgun is black and my tool gun is broken. Why is it doing that even tho the gamemode is derived from sandbox?

[editline]16th June 2014[/editline]

Just realized I don’t need to include init.lua in cl_init, but it still does the same problem.

Try change “base” “sandbox” on “base” “base” in gamemode file

Still have the same problem.

You never AddCSLuaFile’d the shared file, I believe this is the issue.
Also include shared.lua not init.lua in the clientside script.

Here’s a skeleton game-mode; it is set up to recursively include all files in client, shared, server and content/maps/<map_name>/

It uses the principles described here to let shared load it all:

Hopefully it helps.

Thank you very much for helping me, you fixed my problem. I still don’t know what was wrong with the gamemode but now it’s working so w/e,