Gamemode Issue

My whole console.log startup can be found here: http://pastebin.com/rpG25KLq

Sorry for all the info, I’ve tried to leave nothing out

I’ve been trying to fix this all yesterday evening and this morning and can’t work it out :confused:

My issue is, when I join my server with my game mode on it, my phys-gun is invisible and I can’t access the spawn menu. It was working as far as I knew, but I left the GM for a week and came back and something obviously gone wrong.

I’ve first started disabling files individually and in the end just created a new GM with the very basics and it’s still got the same issue. I’ve tried on workshop maps, and gm_flatgrass, other people have joined and have the same problem as well, so I’m not sure. I have also tried completely re-installed a fresh copy of server and put the basic gamemode on and it still had this error.

Everything works fine if I set the gamemode to sandbox

This makes it seem like it’s not an issue with the old gamemode, as it happens on the new one as well, so ideally if I can fix it I’ll go back and continue with my last one instead of rebuilding it all.

My code is under the image:

http://cloud-3.steampowered.com/ugc/432655458569591739/2A4761FB974D09B5C00FE246B16D38AB6F2A2279/1024x578.resizedimage

garrysmod/gamemodes/newgm/newgm.txt



"newgm"
{
	"base"		"sandbox"
	"title"		"newgm"
	"maps"		"^rp_"
	"menusystem"	"1"
   	"author_name"	"Semajnad"
 	"author_email"	"contact@REMOVED.co.uk"
 	"author_url"	"http://www.REMOVED.com/"
 	"version"	    "0.1" 
 	"up_date"	    "05/05/2014"
    "hide"          "0"    
    
}


garrysmod/gamemodes/newgm/gamemode/shared.lua



print("Included shared.lua")
DeriveGamemode( "sandbox" )

GM.Name 	= "REMOVED" --Set the gamemode name
GM.Author 	= "Semajnad" --Set the author name
GM.Email 	= "contact@REMOVED.co.uk" --Set the author email
GM.Website 	= "http://www.REMOVED.com" --Set the author website

//These bits I was asked to add to make sure the spawn menu is enabled (last time this fixed the no spawn menu issue, tried with and without this and no luck)
function GM:SpawnMenuEnabled()
	return true
end

function GM:SpawnMenuOpen()
	return true
end



And the string that’s printed when it loads is printed, checked console.log



Included shared.lua


garrysmod/gamemodes/newgm/gamemode/init.lua



include( 'shared.lua' )
ADDON_NAME = "Test GM"
function Initialize()
    print( ADDON_NAME .. " has been enabled." )
end
hook.Add( "Initialize", "Initialize", Initialize )


And the initialize function does run as I get the print in console.log



Test GM has been enabled.


I’ve also got these, both of which are just empty directories.

garrysmod/gamemodes/newgm/entities/
garrysmod/gamemodes/newgm/content/

I do get the following two errors:

I don’t have a cl_init.lua so I’m guessing that’s the server trying to find one automatically.



[AddCSLuaFile] Couldn't find 'newgm/gamemode/cl_init.lua' (<nowhere>)


and…



[SGN  | Semajnad|2|STEAM_0:1:22686651] Lua Error:
Couldn't Load Init Script: 'newgm/gamemode/cl_init.lua


Do I need a cl_init.lua? Surely all it does in a base gamemode is include shared.lua (I have tried creatted a cl_init.lua with print(“hello”) in and it did print it to the clients console, but still had the spawn meny / phys gun error )

==========

Server start-up:



#!/bin/sh
echo "Starting Server"
screen -A -m -d -S hl ./srcds_run -console -game garrysmod +map gm_flatgrass +maxplayers 16 -autoupdate +gamemode newgm -condebug


Above your include of shared.lua in init.lua, add:

[lua]
AddCSLuaFile(“cl_init.lua”)
AddCSLuaFile(“shared.lua”)
[/lua]

And create a cl_init.lua and add:

[lua]include(“shared.lua”)[/lua]

I feel like the worlds biggest noob. I can’t believe I forgot that :confused: Thank you. <3