From ef3c8049ea0e8b8e4c443567c0277c812b715812 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sat, 23 Jul 2022 04:18:20 -0500 Subject: [PATCH] Fix job route not finishing properly --- scripts/server/job.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/server/job.js b/scripts/server/job.js index c626173e..a1d34fa9 100644 --- a/scripts/server/job.js +++ b/scripts/server/job.js @@ -3665,11 +3665,12 @@ function showCurrentJobLocation(client) { function finishSuccessfulJobRoute(client) { let jobId = getPlayerJob(client); - let jobRouteData = getJobRouteData(jobId, getPlayerJobRoute(client)); + let jobRouteId = getPlayerJobRoute(client); + let jobRouteData = getJobRouteData(jobId, jobRouteId); let payout = toInteger(applyServerInflationMultiplier(jobRouteData.pay)); getPlayerData(client).payDayAmount = getPlayerData(client).payDayAmount + payout; - messageDiscordEventChannel(`💼 ${getCharacterFullName(client)} finished the ${getJobRouteData(jobId, getPlayerJobRoute(client)).name} route for the ${getJobData(jobId).name} job and earned $${getJobRouteData(jobId, jobRouteId).pay}!`); + messageDiscordEventChannel(`💼 ${getCharacterFullName(client)} finished the ${jobRouteData.name} route for the ${getJobData(jobId).name} job and earned $${jobRouteData.pay}!`); messagePlayerSuccess(client, replaceJobRouteStringsInMessage(jobRouteData.finishMessage, jobId, jobRouteData.index)); stopReturnToJobVehicleCountdown(client);