Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #151 from Annalouu/main
Browse files Browse the repository at this point in the history
A fix for "Attempt to compare number with string.
  • Loading branch information
FjamZoo authored Dec 2, 2023
2 parents fe851b0 + 199c389 commit 4876941
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/employment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ RegisterNetEvent('qb-phone:server:fireUser', function(Job, sCID)

local grade = tostring(CachedJobs[Job].employees[srcCID].grade)
if not QBCore.Shared.Jobs[Job].grades[grade].isboss then return end

if CachedJobs[Job].employees[srcCID].grade < CachedJobs[Job].employees[CID].grade then return end
-- for some reason the line next doesnt like being compared to each other even tho they are both numbers so i had to use tonumber
if CachedJobs[Job].employees[srcCID].grade < tonumber(CachedJobs[Job].employees[CID].grade) then return end


CachedJobs[Job].employees[CID] = nil
Expand Down

0 comments on commit 4876941

Please sign in to comment.