Closed Mathu-lmn closed 1 month ago
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 until key
because there would never be a key so it would be an infinite loop
That's why I changed it to until not key
😬
But wouldn't the client crash in a loop with no wait ?
But wouldn't the client crash in a loop with no wait ?
The old loop (which was until key
) would crash with a endless loop because it would wait for key
to be valid, which it would never be.
The fixed loop (which is until not key
) can't crash because if there isn't a key it will break out of the loop.
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
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