Added Police and EMS ranks to jobs.lua now results in error

  1. ` [‘police’] = {
    label = ‘Law Enforcement’,
    defaultDuty = true,
    offDutyPay = false,
    grades = {
    [‘0’] = {
    name = ‘Constable’,
    payment = 60
    },
    [‘1’] = {
    name = ‘Senior Constable’,
    payment = 75
    },
    [‘2’] = {
    name = ‘Sergeant’,
    payment = 100
    },
    [‘3’] = {
    name = ‘Senior Sergeant’,
    payment = 125
    },
    [‘4’] = {
    name = ‘Inspector’,
    isboss = true,
    payment = 150
    },
    [‘5’] = {
    name = ‘Superintendent’,
    isboss = true,
    payment = 175
    },
    [‘6’] = {
    name = ‘Chief Superintendent’,
    isboss = true,
    payment = 200
    },
    [‘7’] = {
    name = ‘Assistant Commissioner’,
    isboss = true,
    payment = 250
    },
    [‘8’] = {
    name = ‘Deputy Commissioner’,
    isboss = true,
    payment = 275
    },
    [‘9’] = {
    name = ‘Commissioner’,
    isboss = true,
    payment = 300
    },

And it now causes:

`[ citizen-server-impl] Server list query returned an error: System.Threading.Tasks.TaskCanceledException: The operation was canceled. ← System.TimeoutException: The operation was canceled. ← System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 30 seconds elapsing.
[ script:qb-core] [qb-core:LOG] Lanson Wolf PLAYER SAVED!
[script:qb-multichara] [qb-core] Lanson Wolf (Citizen ID: EDZ69423) has succesfully loaded!
[ script:qb-core] SCRIPT ERROR: @qb-core/server/player.lua:178: attempt to index a nil value (field ‘Jobs’)
[ script:qb-core] > SetJob (@qb-core/server/player.lua:178)
[ script:qb-core] > callback (@qb-core/server/commands.lua:152)
[ script:qb-core] > handler (@qb-core/server/events.lua:31)
[ script:qb-core] > routeMessage (@chat/sv_chat.lua:187)
[ script:qb-core] > handler (@chat/sv_chat.lua:218)
[ citizen-server-impl] Server list query returned an error: System.Threading.Tasks.TaskCanceledException: The operation was canceled. ← System.TimeoutException: The operation was canceled. ← System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 30 seconds elapsing.

txaEvent “adminsUpdated” “[1]”`

so its now not letting me change the job?

Try replacing the police section with the police in the file I attached. Don’t worry about the jobs = portion that is just to check for LUA errors.
luatest.lua (766 Bytes)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.