Fretta Gamemode Help, Please?

Hello, I’ve been developing a fretta gamemode, but I can’t seem to get it load so that I can test it.

I have it set to be derived from fretta, and I also have fretta in my garrysmod/gamemodes/ .

I’ve tried running fretta then voting for a gamemode, but mine doesn’t appear.

I know I’m doing something wrong, but what could it be?

I’ll provide code if needed.

All help is appreciated.

Hey just a tip here, always post your code so we don’t have to ask for it and make sure its labeled clearly :slight_smile: with file names and such.
Thanks,
Devin

Try to load the gamemode directly, then open your console and look for where it tells you an error about the gamemode or one of the files in the gamemode. We need the error and the code it’s talking about (shared.lua would help as well).

Another thing is make sure that you have an info.txt and it’s properly formatted.

Well, at this point, my console is spammed with “Warning couldn’t load font SandboxLabel” or something along those lines.

My shared.lua




GM.Name 	= "Rebellious Diplomacy"
GM.Author 	= ""
GM.Email 	= ""
GM.Website 	= "http://www.aelig.co.cc/"
GM.Help		= "BREAK THEIR FUCKING LEGS!"

DeriveGamemode( "fretta" )
IncludePlayerClasses()

GM.TeamBased = true					
GM.AllowAutoTeam = true
GM.AllowSpectating = true
GM.SecondsBetweenTeamSwitches = 9001
GM.GameLength = 15
GM.VotingDelay = 5					
 
GM.NoPlayerSuicide = true
GM.NoPlayerDamage = false
GM.NoPlayerSelfDamage = true		
GM.NoPlayerTeamDamage = false		
GM.NoPlayerPlayerDamage = true 	
GM.NoNonPlayerPlayerDamage = true 	
GM.NoPlayerFootsteps = false		
GM.PlayerCanNoClip = false			
GM.TakeFragOnSuicide = true			
 
GM.MaximumDeathLength = 10			
GM.MinimumDeathLength = 5			
GM.AutomaticTeamBalance = false     
GM.ForceJoinBalancedTeams = false	
GM.RealisticFallDamage = false
GM.AddFragsToTeamScore = true		
 
GM.NoAutomaticSpawning = true		
GM.RoundBased = false				
GM.RoundLength = 300					
GM.RoundPreStartTime = 5			
GM.RoundPostLength = 14				
GM.RoundEndsWhenOneTeamAlive = false	
 
GM.EnableFreezeCam = false			
GM.DeathLingerTime = 0				 
 
GM.SelectModel = true               
GM.SelectColor = false				
 
GM.PlayerRingSize = 48             
GM.HudSkin = "SimpleSkin"
 
GM.ValidSpectatorModes = { OBS_MODE_CHASE, OBS_MODE_IN_EYE, }
GM.ValidSpectatorEntities = { "player" }	
GM.CanOnlySpectateOwnTeam = true 

TEAM_RED = 1
TEAM_BLUE = 2
 
function GM:CreateTeams() 
 
	if ( !GAMEMODE.TeamBased ) then return end
 
	team.SetUp( TEAM_RED, "Red Team Fags", Color( 255, 0, 0, 255 ), true )
	team.SetSpawnPoint( TEAM_RED, { "info_player_terrorist" } )
	team.SetClass( TEAM_RED, { "BaseClass", "HeavyClass", "LightClass" } ) 
	
	team.SetUp( TEAM_BLUE, "Blue Team Fags", Color( 0, 0, 255, 255 ), true )
	team.SetSpawnPoint( TEAM_BLUE, { "info_player_counterterrorist" } )
	team.SetClass( TEAM_BLUE, { "BaseClass", "HeavyClass", "LightClass" } ) 
 
	team.SetUp( TEAM_SPECTATOR, "Spectators", Color( 200, 200, 200 ), true )
	team.SetSpawnPoint( TEAM_SPECTATOR, { "info_player_start", "info_player_terrorist", "info_player_counterterrorist", "info_player_combine", "info_player_rebel" } ) 
 
end



And init.lua





AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )

include( "shared.lua" )

function GM:OnRoundStart( num )

	UTIL_UnFreezeAllPlayers()

end

function GM:OnRoundResult( t )
	
	team.AddScore( t, 1 )
	
end

function GM:RoundTimerEnd()

	if ( !GAMEMODE:InRound() ) then return end

	if team.GetScore( TEAM_RED ) < team.GetScore( TEAM_BLUE ) then
		GAMEMODE:RoundEndWithResult( TEAM_BLUE )
	elseif team.GetScore( TEAM_RED ) > team.GetScore( TEAM_BLUE ) then
		GAMEMODE:RoundEndWithResult( TEAM_RED )
	end

end

function GM:CheckRoundEnd()

	for t=1,2 do
	
		if team.TotalFrags( t ) >= 30 and GAMEMODE:InRound() then
	
			GAMEMODE:RoundEndWithResult( t )
		
			for k,v in pairs( team.GetPlayers( t ) ) do
				v:SetFrags( 0 )
			end
		
		end
	
	end

end

function GM:DoPlayerDeath( ply, attacker, dmginfo )

	self.BaseClass:DoPlayerDeath( ply, attacker, dmginfo )
	
	if dmginfo:IsExplosionDamage() then
		ply:SetModel( table.Random( GAMEMODE.Corpses ) )
	end
	
end



I’m just trying to see how things work, and get an understanding for fretta before I go on to making a more complicated gamemode.

Thanks,
Double

Whats the gamemodes folder name? if it has a space in it, it won’t run

It is TeamDM.

Yeah, you can’t have capital letters in your gamemode folder’s name. I’m making a gamemode aswel, just for testing it out, where I couldnt load it, but then I tried with non-capital letters, and it worked. Notice that none of the gamemodes in your gamemodes folder has capital letters in it.

Hope this helped.

  • Busy

Erm, not really, the following gamemodes work fine
DarkRP
GMStranded
Flood
Frettabox
…and so on.

Hm, well - It worked for me. :confused: