attempt to index local 'jobTable' (a nil value)

I have a new starwarsrp server, I started by changing some things in the original darkrp gamemode so that my server would show up in the starwarsrp section. Then I got darkrp modifications and whenever I change something in disabled defaults I start getting this error. It happens when I press f4.


[ERROR] gamemodes/starwarsrp/gamemode/modules/base/cl_gamemode_functions.lua:23: attempt to index local 'jobTable' (a nil value)
  1. Call - gamemodes/starwarsrp/gamemode/modules/base/cl_gamemode_functions.lua:23
   2. unknown - gamemodes/starwarsrp/gamemode/modules/base/cl_gamemode_functions.lua:62


Sorry if I haven’t told you enough, if there is anything else you need to know please ask.

jobTable is returning nil, most likely meaning that the variable is referenced but is not defined. Post the lua code from gamemodes/starwarsrp/gamemode/modules/base/cl_gamemode_functions.lua so we can have a better look please.

That error happens as a result of previous errors. Look further back in your server console and post the other errors

Not questioning your answer I would sincerely like to know, but how do you know that it is based off of other errors? The error itself is all in the same file, how can you tell?

Because if an earlier error happened in another file before jobTable was initialised, then that file wouldn’t have fully loaded, meaning when another one comes to use it, jobTable is nil.