Gamemode wont derive from base

In shared.lua I have

[lua]DeriveGamemode( “sandbox” )[/lua]

Yet when I load the gamemode, I’m missing sandbox functionality and in console it says “MyGamemode” derived from base.

What am I missing to cause it to go wrong?

Well one thing would be to check and make sure you have the sandbox gamemode on your server in case it got deleted some how

Not very knowledgeable about deriving game modes but is it possible that its case sensitive?
In Sandbox’s shared.lua Garry’s calling it
GM.Name = “Sandbox”

(not sure if that sets the name it can be called by or not but doesn’t hurt to try)

I think this may be the case but I’m running it locally. I can play sandbox fine but now if I look I don’t see a sandbox folder in the gamemodes folder. Any ideas?

I tried case sensitive but that didn’t change anything.

That’s because it’s inside the Garry’s Mod GCF. Just about all default content (if not all) is loaded from the GCF, and is not inside your garrysmod/garrysmod/ folder.

Right, that’s what I assume was happening before, but now I can’t come to other conclusions. What could possibly be interfering with the deriving?

Check for any Lua errors that are stopping the gamemode from loading.

No lua errors popping up, just

Lua initialized (Lua 5.1)
Registering gamemode 'Sandbox' derived from 'base'
Registering gamemode 'MyNewGamemode' derived from 'Sandbox'
ScriptEnforce is disabled
Executing listen server config file
exec: couldn't exec listenserver.cfg
InitFastCopy: only 51% fast props. Bug?
Lua initialized (Lua 5.1)
Registering gamemode 'MyNewGamemode' derived from 'base'
Sending 8 'User Info' ConVars to server (cl_spewuserinfoconvars to see)
Scanning for downloaded fonts..
Redownloading all lightmaps

Try making Sandbox lowercase.

Already tried upper and lower case :smith:

So, you’re just doing DeriveGamemode(“Sandbox”)?

it is working

Lua initialized (Lua 5.1)
Registering gamemode 'Sandbox' derived from 'base'
Registering gamemode 'MyNewGamemode' derived from 'Sandbox'  <-- it deriving MyNewGamemode from sandbox on this line

It does say “sandbox from base” and then “mynewgamemode derived from sandbox” but then after that just says “mynewgamemode derived from base”.

I’m also not getting any of the functionality of sandbox when I play my gamemode. (No Q menu, no hints, can’t use certain base classes from sandbox or whatever, etc.)

that means it’s deriving properly on the server and not on the client, and being single player they show up in the same place, the first is blue and the second that says base is orange/yellow?

sorry if these seem like dumb questions, i’m just trying to get a feel for the problem, and how much you know.


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

I also had the wrong cl_init opened along with the correct shared/init :saddowns:

Thanks for the help though haha