Help with game mode error

Hi, I am trying to host a server with a gamemode called objhunt, and I want it to come up as prop hunt (with other prop hunt servers). It works completely fine when it is named objhunt, but when I change it to prop_hunt and edit the files I get an error that breaks the teams. I’m still new to coding lua, and I have no clue how to fix this. All I know is that it breaks the teams.

This is the error I get:

[ERROR] lua/includes/modules/team.lua:29: table index is nil

  1. SetUp - lua/includes/modules/team.lua:29
  2. unknown - gamemodes/prop_hunt/gamemode/shared.lua:77

Here is a link to my edited copy of the game mode:

If anyone could figure out what is causing this and knows how to fix it, I would really appreciate it!!!

What files are you editing altogether?

I just want the server to come up as prop hunt, with other prop hunt servers.
The files I changed to make it come up as prop hunt were:

  1. The game mode’s folder itself
  2. the lines with,, etc (replaced them with the actual prop_hunts)
  3. prop_hunt.txt is from the actual prop hunt, objhuntold.txt is the one that came with the game mode. (it was originally objhunt.txt)

Thanks for replying so quickly

Try using the base gamemode without modifying anything.

You’re breaking everything because you renamed the gamemode folder.

local csFiles, _ = file.Find( "ObjHunt/gamemode/"..addDir.."/*", "LUA" )

Line 21 of shared.lua.

Nothing is getting properly included.