You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
retval is still important to return value specifiers, but it has been discarded so far and only value has been returned.
This means that when the native function thinks something wrong and returns such as 0 or -1 instead of the expected result, assuming that "FFF" is passed, you will get three wrong arrays of float values.
I can't think of any good plan at the moment, such as push retval to the last item of the value array. But it can also lead to breaking changes.
see CA_RayCastLine.
Take the function of colandreas as an example
functionrayCastLine(startX: number,startY: number,startZ: number,endX: number,endY: number,endZ: number){const[x,y,z]=samp.callNative("CA_RayCastLine","ffffffFFF",startX,startY,startZ,endX,endY,endZ)asnumber[];// cannot get retval // if (retval === 0) return null;// so if retval === 0 returned native, "FFF" get wrong valuereturn{ x, y, z };}
The text was updated successfully, but these errors were encountered:
callNative and callNativeFloat
retval
is still important to return value specifiers, but it has been discarded so far and only value has been returned.This means that when the native function thinks something wrong and returns such as
0
or-1
instead of the expected result, assuming that"FFF"
is passed, you will get three wrong arrays of float values.I can't think of any good plan at the moment, such as push
retval
to the last item of the value array. But it can also lead to breaking changes.see specifiers.
see retval.
see natives.cpp.
see CA_RayCastLine.
Take the function of colandreas as an example
The text was updated successfully, but these errors were encountered: