Gamemode is not Valid?

I’m trying to make a gamemode, but every time I try and open a map with it it says “gamemode is not valid”. what does this error mean?

It either couldn’t find the init.lua or you misnamed it.

so what is the folder tree? it goes gamemodes\MyGamemode\gamemode\init.lua, right?

Got a info.txt in the root?

yes, in MyGamemode folder.

okay, here is my folder tree:

C:\Program Files\Steam\steamapps	om3927\garrysmod\garrysmod\gamemodes\SandBox Wars\Gamemode\init.lua

and here is my info.txt:

 	"name"		"SandBox Wars"
 	"version"	"0.1" 
 	"up_date"	"09/23/2011" // The date this version was published. Set before release!
 	"author_name"	"The Kakistocrat"
 	"author_email"	"None"
 	"author_url"	"none"
 	"info"		"A Gamemode in Progress"
 	"icon" 	 	"" // Icon to show in the Mods list inside Garry's Mod
 	"hide"		"0" // Do not hide this gamemode from the Mods list inside Garry's Mod
	"mappattern" // This sets all maps with gt_ before the name to default the map gamemode to "GM_test"
		"1"	"^SBW_"

If I remember correctly I don’t think you can have a space in your Gamemodes folder name.

try changing it to something like:
C:\Program Files\Steam\steamapps om3927\garrysmod\garrysmod\gamemodes*SandBoxWars*


C:\Program Files\Steam\steamapps om3927\garrysmod\garrysmod\gamemodes*SandBox_Wars*

-snip- late

thanks, works fine now.