From 011e5c71fa885af12229fc37c0c3042c2b0fa868 Mon Sep 17 00:00:00 2001 From: Solareon <769465+solareon@users.noreply.github.com> Date: Sun, 18 Aug 2024 22:22:08 +0200 Subject: [PATCH] fix(server/player): convert grade to number --- server/player.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/player.lua b/server/player.lua index 6d21a040d..adf1a142a 100644 --- a/server/player.lua +++ b/server/player.lua @@ -592,7 +592,7 @@ function CreatePlayer(playerData, Offline) ---@return ErrorResult? errorResult function self.Functions.SetJob(jobName, grade) jobName = jobName:lower() - grade = grade or 0 + grade = tonumber(grade or 0) local job = GetJob(jobName) if not job then lib.print.error(('cannot set job. Job %s does not exist'):format(jobName)) @@ -622,7 +622,7 @@ function CreatePlayer(playerData, Offline) ---@return ErrorResult? errorResult function self.Functions.SetGang(gangName, grade) gangName = gangName:lower() - grade = grade or 0 + grade = tonumber(grade or 0) local gang = GetGang(gangName) if not gang then lib.print.error(('cannot set gang. Gang %s does not exist'):format(gangName))