Gamemode doesn't load

Hi, it’s my first gamemode, and when I load it i get this error in console



LuaGetfile: Not Loading Half Life Team Fortress/gamemode/cl_init.lua
Couldn't include file 'Half Life Team Fortress/gamemode/cl_init.lua' (File not found)
**********************************************
**********************************************
********** COULDN'T LOAD GAMEMODE!! **********
**********************************************
**********************************************

There was a problem opening the gamemode file 'Half Life Team Fortress/gamemode/cl_init.lua'


Registering gamemode 'Half Life Team Fortress' derived from 'base'


But the file Half Life Team Fortress/gamemode/cl_init.lua exists, here is its text.

[lua]include( “init.lua” )

concommand.Add(“go_combine”, sb_team1)
concommand.Add(“go_rebel”, sb_team2)[/lua]

init.lua contains

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

include( “shared.lua” )

function GM:PlayerSpawn( ply )

self.BaseClass:PlayerSpawn( ply )   

ply:SetGravity( 0.75 )  
ply:SetMaxHealth( 100, true )  

ply:SetWalkSpeed( 325 )  
ply:SetRunSpeed( 100 ) 

end

function GM:PlayerInitialSpawn( ply )
CheckSpecialCharacters( ply )
if ply:IsAdmin() then
sb_team2( ply )
else
joining( ply )
RunConsoleCommand( “sb_start” )
end
end

function GM:PlayerLoadout( ply )
if ply:Team() == 1 then
ply:Give( “weapon_pistol” )

elseif ply:Team() == 2 then
	ply:Give( "weapon_pistol" )
	
end

end

function sb_team1( ply )
ply:SetTeam( 1 )
ply:Spawn()
ply:PrintMessage( HUD_PRINTTALK, "You are a Combine, "…ply:Nick() )

function sb_team2( ply )
ply:SetTeam( 2 )
ply:Spawn()
ply:PrintMessage( HUD_PRINTTALK, "You are a rebel, "…ply:Nick() )
end

[/lua]

shared.lua contains this:

[lua]GM.Name = “Half Life 2: Team Fortress”
GM.Author = “Tera”
GM.Email = “gabrycir@hotmail.it”

DeriveGamemode( “base” )

team.SetUp( 1, “Combine”, Color( 125, 125, 125, 255 ) )
team.SetUp( 2, “Resistance”, Color( 255, 255, 255, 255 ) )[/lua]

I am almost certain that gamemodes can not have spaces in the names, try removing the spaces from Half Life Team Fortress.

Yeah, this man speaks the truth. Use an underscore instead of a space, or just join the two words.

Thanks, it’s ok now, but when i write go_combine in console i get this error



] go_combine 
HLTF\gamemode\init.lua:39: attempt to call method 'SetTeam' (a nil value)


Why is SetTeam not existing?

Perhaps because you forgot a end at that function…

I fixed it before discovering that problem

[lua]
function sb_team1( ply )
ply:SetTeam( 1 )
ply:Spawn()
ply:PrintMessage( HUD_PRINTTALK, "You are a Combine, "…ply:Nick() )
end[/lua]