[ERROR] gamemodes/teamdeathmatch/gamemode/init.lua:17: '<eof> Please help

Hi, im making a custom gamemode and I keep getting this error:

[ERROR] gamemodes/teamdeathmatch/gamemode/init.lua:17: '<eof>

And I dont know how to fix it and I get also another error

Couldn’t include file ‘shared.lua’ (File not found) (@gamemodes/teamdeathmatch/gamemode/cl_init.lua (line 1))

But im guessing that it is because of the other error

This is my code for cl_init.lua shared.lua init.lua and player.lua

cl_init.lua
include(“shared.lua”)

shared.lua
GM.Name = “Team Deathmatch”
GM.Author = “Platinum*Warrior”
GM.Email = “N/A”
GM.Website = “http://steamcommunity.com/groups/tsjusticeleague

team.SetUp( 0, “SAS”, Color(0, 0, 255) )
team.SetUp( 1, “Spetznaz”, Color(255, 0, 0) )

function GM:Initialize()
self.BaseClass.Initialize( self )
end

init.lua

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

include(“shared.lua”)
include(“player.lua”)

function GM:PlayerConnect( name, ip )
print("Player " … name … “, has joined the game.”)
end

function GM:PlayerInitialSpawn( ply )
ply:SetCrouchSpeed( 170 )
ply:SetWalkSpeed( 225 )
ply:SetGamemodeTeam( n )
ply:SetRunSpeed( 270 )
end
end

function GM:PlayerSpawn( ply )
ply:SetModel(“models/player/swat.mdl”)
ply:GiveGamemodeWeapons()
end

player.lua
local ply = FindMetaTable(“Player”)

local teams = {}

teams[0] = {name = “SAS”, color = Vector( .2, .2, 1.0 ), weapons = {“bb_m4a1”, “bb_glock”}}
teams[1] = {name = “Spetznaz”, color = Vector( 1.0, .2, .2 ), weapons = {“bb_ak47”, “bb_p228”}}

function ply:SetGamemodeTeam( n )
if not teams[n] then return end

self:SetTeam( n )

self:SetPlayerColor( teams[n].color )

self:GiveGamemodeWeapons()

return true

end

function ply:GiveGamemodeWeapons()
local n = self:Team()
self:StripWeapons()

for k, wep in pairs(teams[n].weapons) do
	self:Give(wep)
end

end

Please help

I think it’s the extra end you have after the GM:PlayerInitialSpawn() function

Also, that little 17 refers to the line that’s erroring, in the future just check around that area for any obvious errors

Thanks man It works can you help me with this?
[ERROR] gamemodes/teamdeathmatch/gamemode/init.lua:12: attempt to call method ‘SetCrouchSpeed’ (a nil value)

  1. unknown - gamemodes/teamdeathmatch/gamemode/init.lua:1

Probably means that it’s not an actual Gmod function, and whoevers base you’re using defined on their own

Try this (note it’s a multiplier)

Ok thx