Project-Sloth / ps-multijob

A script designed with a sleek and modern design for being able to display your current jobs as well as switching between them.
https://www.discord.gg/projectsloth
54 stars 41 forks source link

PS-MULTIJOB will randomly quit firing and will not begin again until resource restarted #29

Closed UncleSpuds closed 1 year ago

UncleSpuds commented 1 year ago

I get the exact same error as issue #22 --

SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:739: SCRIPT ERROR: @ps-multijob/server/sv_main.lua:138: attempt to index a nil value (field '?')

It is predominantly myself and one other person on the server that experiences it the most. A quick restart of ps-multijob clears the problem right up, but we are a growing server and this problem likely will start to happen to more people so I would like to understand it and know what I can do to fight it.

The corresponding code in sv_main.lua doesn't really tell me much (personally)

  getjobs = {
        name = job,
        grade = grade,
        description = Config.Descriptions[job],
        icon = Config.FontAwesomeIcons[job],
        label = QBCore.Shared.Jobs[job].label,
        gradeLabel = QBCore.Shared.Jobs[job].grades[tostring(grade)].name,  -- Error break happens here
        salary = QBCore.Shared.Jobs[job].grades[tostring(grade)].payment,
        active = online,
    }
    if Config.WhitelistJobs[job] then
        whitelistedjobs[#whitelistedjobs+1] = getjobs
    else
        civjobs[#civjobs+1] = getjobs
    end
end`

Can anyone steer me in the right direction?

I just upgraded to 1.1.1 using a git pull -- so I can't say if the problem still exists.

UncleSpuds commented 1 year ago

Wait... you just closed it? No comment or anything?

I didn't get any resolution from an update to the latest version and the problem is still there--- do you have any advice for us?

MonkeyWhisper commented 1 year ago

Fix it yourself, this is an open source script.

Wait... you just closed it? No comment or anything?

I didn't get any resolution from an update to the latest version and the problem is still there--- do you have any advice for us?