Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix errors and warnings across esx-legacy #86

Merged
merged 12 commits into from Feb 17, 2022
Merged

fix errors and warnings across esx-legacy #86

merged 12 commits into from Feb 17, 2022

Conversation

thelindat
Copy link
Contributor

No description provided.

Remove some instances of collation mixing.

includes:
fix(sql): don't allow NULL identifier in billing, user_licenses, and user_parkings
Tick time is ~15ms, so anything that needs to occur on-frame should use Wait(0)
Many natives have updated / more accurate names.
Use await on queries during startup for less nesting / callback hell, and to delay the paycheck and save intervals from starting too early.
Deprecate the usual method of manually iterating through 'ESX.GetPlayerData().inventory'.
Better and less confusing.
Race conditions were introduced due to a mix of FiveM's updated scheduling and the swap to oxmysql responding faster than the client can load.

This should alleviate the issue, though a more solid solution should be found.
@thelindat thelindat changed the title WIP: Refactor and fix undefined values WIP: fix errors and warnings across esx-legacy and add optional ox inventory support Feb 14, 2022
@thelindat thelindat changed the title WIP: fix errors and warnings across esx-legacy and add optional ox inventory support WIP: fix errors and warnings across esx-legacy Feb 15, 2022
@thelindat thelindat marked this pull request as ready for review February 15, 2022 16:28
@thelindat
Copy link
Contributor Author

Going to do the inventory stuff separately.

@Mycroft-Studios

@Mycroft-Studios
Copy link
Contributor

👍🏼 , will have it tested. looking over the code it seems fine, although, for the Wait Changes, wouldn`t it be better to add sleeps to some of them?

@thelindat
Copy link
Contributor Author

To quote bubble

Wait will round to the nearest frame (as it’s tick-based) so all you’re doing here is causing problems for anyone with over 200 FPS at no noticeable other gain.

If you want to run something every frame, use 0, don’t try to be clever with values between 1 and 15 or so.

Copy link
Contributor

@PsychoShock PsychoShock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't really change anything so just by looking at it, code will work. It's small improvements. 👍

@Mycroft-Studios
Copy link
Contributor

To quote bubble

Wait will round to the nearest frame (as it’s tick-based) so all you’re doing here is causing problems for anyone with over 200 FPS at no noticeable other gain.
If you want to run something every frame, use 0, don’t try to be clever with values between 1 and 15 or so.

👍🏼 😄

@thelindat thelindat changed the title WIP: fix errors and warnings across esx-legacy fix errors and warnings across esx-legacy Feb 16, 2022
@Mycroft-Studios Mycroft-Studios merged commit 6436bb2 into esx-framework:main Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants