citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.47k stars 2.05k forks source link

Script errors with blip natives #2487

Closed freedy69 closed 4 months ago

freedy69 commented 4 months ago

What happened?

A few blip natives such as DoesBlipExist and RemoveBlip seem to cause native errors when you pass -1 as the blip index argument. This can be an issue for scripts that use -1 as default value for their blip variable and checking if the blip exists with DoesBlipExist

Expected result

There shouldn’t have been a native error, DoesBlipExist would return false

Reproduction steps

  1. Create a resource
  2. Write “DoesBlipExist(-1)”
  3. There should be a native execution/script error in f8

Importancy

There's a workaround

Area(s)

Natives

Specific version(s)

Seems to be an issue after the tuners update though not 100% sure

Additional information

No response