Need some help updating to GM13

Alright so there are a few things that I don’t know how to fix.

Here they are:

  1.  local tr = util.GetPlayerTrace( self.Owner )
     tr.mask = ( CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_MONSTER|CONTENTS_WINDOW|CONTENTS_DEBRIS|CONTENTS_GRATE|CONTENTS_AUX )
     local trace = util.TraceLine( tr )
    

error: ‘>’ expected near ‘|’ , I don’t understand what it means exactly, don’t know where to put ‘>’

local ClientResources = 0;
local function ProcessFolder ( Location )
for k, v in pairs(file.Find(Location … ‘*’) ) do
if file.IsDir(Location … v) then
ProcessFolder(Location … v … ‘/’)

error: bad argument #2 to ‘Find’ (string expected, got no value)

function GM:InitPostEntity ( )
self.GatherInvalidNames();

timer.Simple(1, GAMEMODE.PushNumPlayers);

end

error: attempt to call field ‘GatherInvalidNames’ (a nil value)

^ Don’t know what to put instead?

Any help will be appreciated, thank you in advance. :slight_smile:

**1. **[lua]
tr.mask = bit.bor(CONTENTS_SOLID,CONTENTS_MOVEABLE,CONTENTS_MONSTER, CONTENTS_WINDOW,CONTENTS_DEBRIS,CONTENTS_GRATE,CONTENTS_AUX)
[/lua]
2. [lua]file.Find(“entities/*.lua”,”LUA” )[/lua]
file.Find now returns two tables - files and folders. The second argument is the search path.
“LUA” searches the lua files (in /lua/, in your gamemodes, in all the addons).
“GAME” searches all the mounted content (main folder, addons, mounted games etc).
“MOD” searches only the garrysmod folder.
“DATA” searches in the data folder.
Type “path” in the console to see the paths.

3.‘GatherInvalidNames’ is an invalid variable, means it hasn’t been defined.

Thanks a bunch, but I don’t know how to define ‘GatherInvalidNames’?

Also, there’s a few more that really puzzle me.

function GM.PushNumPlayers ( )
if (GAMEMODE.ServerIdentifier == 0) then return; end

local numPlayers = gatekeeper:GetNumClients().total;
Msg("Sending number of players to database...

");
tmysql.query(“UPDATE vortigaunt_system SET value=’” … numPlayers … “’ WHERE key='players_” … GAMEMODE.ServerIdentifier … “’ LIMIT 1”);
end

error: attempt to index global ‘gatekeeper’ (a nil value) - Im guessing I have to define this as well, but I have no idea how.

And this one just really puzzles me:


v.pantingSound:Stop();
v.pantingSound:Play();
end
elseif (v.pantingSound) then
v.pantingSound:Stop();
v.pantingSound = nil;
end
end
end
-ERROR SAYS HERE, LINE 67- end
hook.Add(“Think”, “ManageSprint”, ManageSprint);

error: ‘<eof>’ expected near ‘end’

Gatekeeper is a module and in order to figure out the line 67 error we need to see the entire function
Edit: if you already have gatekeeper then i’m useless.