[Bug] Native argument issue with reference parameters - Client JS #88
william-des
started this conversation in
[BUG] FiveM for GTAV Enhanced
Replies: 1 comment 2 replies
|
A fix for this bug has been implemented and is available in the latest patch b95. Please try again and let us know if the issue persists. Thanks for your help! |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
It looks like natives with vector reference (&vec3) output parameters are no longer handled the same way as on Legacy.
GetSafeCoordForPed(candidateX, candidateY, playerPos.z, false, 4 | 8 | 16) works correctly on Legacy, but on Enhanced it throws an error.
Error: Script error in Native GetSafeCoordForPed: Native: GetSafeCoordForPed arg[4]: Failed to cast values to vector reference: not enough numeric argumentsAccording to the documentation, the signature is:
However, the native's internal signature appears to be:
On Enhanced, the only way I can make it work is by explicitly providing placeholder values for the output vector reference:
GetSafeCoordForPed(10.0,10.0,10.0, false, 0.0, 0.0, 0.0, 4 | 8 | 16)
It looks like natives with vector reference (&vec3) output parameters are no longer handled the same way as on Legacy.
Issue type
Client
Repro rate
Always
Server build version
92
OS
No response
CPU
No response
GPU
No response
RAM
No response
Storage type
None
Connection type
None
ISP and bandwidth
No response
DxDiag
No response
Network graph
No response
Platform
None
OS version / distribution
No response
CPU
No response
RAM
No response
Using txAdmin?
None
Hosting provider
None
Machine type
None
/perf endpoint output
No response
DDoS protection
No response
ulimit -n value (Linux only)
No response
Docker Compose file (Docker only)
No response
Steps to Reproduce
GetSafeCoordForPed(10.0, 10.0, 10.0, false, 4 | 8 | 16)Expected Behavior
Same native signature as Legacy
Actual Behavior
Error: Script error in Native GetSafeCoordForPed: Native: GetSafeCoordForPed arg[4]: Failed to cast values to vector reference: not enough numeric arguments
Evidence
No response
Additional Context
No response
All reactions