fix(es_extended/server/functions): missing attributes for unemployed#1614
Merged
Conversation
Added missing attributes for unemployed job if no Jobs found
Kenshiin13
suggested changes
Feb 17, 2025
Kenshiin13
left a comment
Contributor
There was a problem hiding this comment.
xPlayer.job.whitelisted is still missing
Added the missing whitelisted attribute for defaulted unemployed job.
Contributor
Author
Corrected, thanks. |
The queries assume that the parsed grades are numerically indexed. But removing ipairs method, and using pairs method, allows to loop grades that are indexed with strings as well. Just like we are using pairs method inside generatenewJobTable
Contributor
Author
|
Added another commit to this PR as well:
|
Kenshiin13
suggested changes
Feb 17, 2025
Added checks for skin_male and skin_female before json encoding to prevent 'NULL' entries in database
Contributor
Author
Fixed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Missing attributes when indexing unemployed job into ESX.Jobs. Database contains name column for jobs table and for job_grades it also contain a grade name column.
Also fixed loop method for grades when inserting into queries.
Description
Adds the missing attributes when assigning unemployed to ESX.Jobs if no jobs are found.
Also fixed loop method for grades when inserting into queries.
Motivation
Because it makes sense
Implementation Details
N/A
Usage Example
3rd party script that compares grades[].name wouldn't work if this attribute is missing.
Fixes issues where creators parse job grades indexed with strings.
PR Checklist