Gamemode doesn't load.

Fist of all yes, i’m rather new to Lua, and i’ve been learning for a few weeks now, so i thought it’d be a good idea to try and modify gamemodes.
My problem here is, that whatever i do, even if i make a new gamemode from scratch from the tutorials, it simply won’t load.
Always someting with the init.lua file, even though they’re completely the same.

I’ve tested this by trying to modify a simple TeamDM gamemode, so i just took this gamemode 'rebelsvscombine (which worked by the way) copied it, and changed the name to ‘rebelvscombine WIP’.
But yet again, even without me trying to modify the code, it doesn’t work again =(
It always derives sandbox instead of fretta, which is put in the shared.lua file

I know the problem lies in something simple, which i will probably hit myself on the head for later, but all i want to do is learn this, and get the hang of it.

Sorry for being a noob, guys =/

Also, here’s the console, if it helps…



Lua initialized (Lua 5.1)
Reverting sv_defaultgamemode to sandbox - gamemode is not valid.
Registering gamemode 'sandbox' derived from 'base'

Decompressing data pack into virtual file system..
Data pack loaded: 487 files. (0.723s)
Lua initialized (Lua 5.1)
Ignoring autorun\arr_says_pete_the_pirate.lua because SE is on and it's not in the VFS
Ignoring autorun\zombine_npc.lua because SE is on and it's not in the VFS
Ignoring autorun\Metroplayers.lua because SE is on and it's not in the VFS
Ignoring autorun
pc_metropolices.lua because SE is on and it's not in the VFS
Ignoring autorun\phx_content.lua because SE is on and it's not in the VFS
Ignoring autorun\client\mount2_init.lua because SE is on and it's not in the VFS
Ignoring mount2\mount2_menu_cl.lua because SE is on and it's not in the VFS
Registering gamemode 'sandbox' derived from 'base'
KeyValues Error: LoadFromBuffer: missing { in file materials/weapons/mhicon.vmt



You can’t have any spaces in your gamemode folder name.

That is seriously worth a good slap on the head…
I thought they would have atleast mentioned this somewhere on google, but it let me down :frowning:

Why the hell are you searching Google? Use the wiki for your references.

I did, but either they didn’t mention not putting spaces in it, or i didn’t see it…
I tried it with all 3 gamemode tutorials, and i never saw any indication of “don’t set spaces in the title”

As a general rule, when you are programming: avoid spaces. You wouldn’t declare a variable/function with a space in it’s name, would you?

I tried everything you said, I have the same problem, but when I use the command “changegamemode rp_evocity_v2d darkrp” In the console once everything has loaded, it works fine. But I really don’t want to have to do that every time I start up the server… -.- please help. (I HAVE NO SPACES!)

I’m working on a deathrun gamemode, At the moment,

I put “Slick Deathrun”

So then I put “Slick-Deathrun”

If you have space’s for you’re gamemode folder name It won’t show.

Guy’s this thread is 8 month’s old… ^.^

sv_defaultgamemode “darkrp”
^ that in your server.cfg