Creating a gamemode, getting some errors.

It is saying “Couldn’t load init script.”
It is also saying "Attempt to call global “AddCsLuaFIle” a nil value

I will send my current files.

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/male07”)
end

Welcome to FacePunch :slight_smile:

The reason you’re receiving the error is because it’s AddCSLuaFile, not AddCsLuaFile, remember variables and function names are CaSe SeNsItIvE.

In the future please use


 or [lua] tags around your code.