-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Reorganize KVP natives and fix Lua example for the "find" functions #2511
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These don't need a Wait
, doing so would just slow down getting the KVPs (especially server side, since it ticks once every 50ms).
Have you tried it ? I can't right now as I'm away but I can next week if needed ! |
Yes, the example works fine, you don't need to wait to get the kvp string though. |
I wonder why I added it then. I think the client crashed with no wait but I can't check now |
Likely crashed with the |
That's why I changed it to |
But wouldn't the client crash in a loop with no wait ? |
The old loop (which was The fixed loop (which is |
Yes, what I meant is that in regular while loops, if you don't put a Wait(0), the Fivem client freezes and you ultimately crash. I'm wondering if it's the case with the repeat operator too |
I've tested without the Wait and it works fine, thanks for the feedback @AvarianKnight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. 👍
Goal of this PR
This PR puts all the KVP related native decls in the kvp folder
It also provides a fix for the Lua example script that wasn't working due to a wrong boolean check and a missing Wait
How is this PR achieving the goal
By moving all the KVP files in the KVP folder and fixing the Lua example in both StartFindKvp and StartFindExternalKvp
This PR applies to the following area(s)
Natives
Game builds: X
Platforms: X
Checklist