Lua Gamemode Errors

So, here are my errors:



[AddCSLuaFile] Couldn't find 'cl_init.lua' (@gamemodes/gamemode/gamemode/init.lu
a (line 1))
[AddCSLuaFile] Couldn't find 'shared.lua' (@gamemodes/gamemode/gamemode/init.lua
 (line 2))
Couldn't include file 'shared.lua' (File not found) (@gamemodes/gamemode/gamemod
e/init.lua (line 4))
Couldn't include file 'player.lua' (File not found) (@gamemodes/gamemode/gamemod
e/init.lua (line 5))

[ERROR] gamemodes/gamemode/gamemode/init.lua:14: attempt to call method 'SetGame
ModeTeam' (a nil value)
  1. unknown - gamemodes/gamemode/gamemode/init.lua:14


Here are all of the files in my gamemode folder:

cl_init.lua


include("shared.lua")

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 )
	print("Player: " .. ply:Nick() .. ", has spawned.")
	
	ply:SetGameModeTeam( 0 )
end

function GM:PlayerAuthed( ply, steamID, uniqueID )
	print("Player: " .. ply:Nick() .. ", has gotten authed.")
end

function GM:PlayerSetModel( ply )
	ply:SetModel("models/player/group01/male_07.mdl")
end

player.lua


local ply = FindMetaTable("Player")

function ply:SetGameModeTeam( n )
	if n < 0 or n > 1 then return false end
	
	self:SetTeam( n )
	
	if n == 0 then
		self:SetPlayerColor( Vector( .2, .2, 1.0 ) )
	elseif n == 1 then
		self:SetPlayerColor( Vector( 1.0, .2, .2 ) )
	end
	
	return true
end

shared.lua


GM.Name = "Gamemode"
GM.Author = "Mr.Mezzy"
GM.Email = "N/A"
GM.Website = "N/A"

team.SetUp( 0, "Blue", Color(0, 0, 255) )
team.SetUp( 1, "Red", Color(255, 0, 0) )

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

Any help will be greatly appreciated!

-Regards

Example: https://dl.dropboxusercontent.com/u/26074909/tutoring/loading_files_across_realms.lua.html

Here is a game-mode base / skeleton; part of the one I’m getting ready to release on bitbucket. This will handle including, AddCSLuaFile, etc for all Lua files located in the folders. The maps directory, make a directory with the current map name, and it’ll load all of those files too. - it recurses, so make as many sub-folders as you want.
https://dl.dropboxusercontent.com/u/26074909/tutoring/_redistributable/basedev_gamemode.rar

It may have issues finding the files because of the game-mode name; I’ve seen similar problems in the past.

Can you post a photo of your folder structure?

Here is the link to the photo:

Imgur

[editline]14th June 2014[/editline]

Well I actually found the problem! It was the name after all! Thank you so much!

Glad it was able to be figured out!

Never use capital letters in any folders or files. While Lua is case sensitive, files in Windows are not; files in Linux are. If you distribute this, or run it on a Linux box, you’ll have issues all around. Keep everything lowercase without any hyphens or magic characters.

Please mark this thread as solved in the top left corner.