Hello everyone,
i’m a bit confused , i wanted to add blipsprite on the minimap for the shop i made,
but at my own surprise , this getting me error and i don’t understand why, here is code i used :
Blip b = World.CreateBlip(g.wSeller);
//b.Name = "Ammunition";
b.Sprite = BlipSprite.AmmuNation;
and i get this error :
[ 41372] InvokeNative: execution failed: Error executing native 0x5a039bb0bca604b6 at address 0x140a0097a.
[ 41372] Failed to instantiate instance of script ClassLibrary2.SHOP.GunStore: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Value does not fall within the expected range.
[ 41372] at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <a4e3abdd630b4c98a9d6f31a99197de6>:0
[ 41372] at (wrapper cominterop) CitizenFX.Core.IScriptHost:InvokeNative (CitizenFX.Core.fxScriptContext&)
[ 41372] at <0x00000 + 0x00000> <unknown method>
so i tried with the old way with native function :
int blip = Function.Call<int>((Hash)0x5A039BB0BCA604B6, g.wSeller.X, g.wSeller.Y, g.wSeller.Z);
Function.Call(Hash.SET_BLIP_SPRITE, blip, 110);
Function.Call(Hash.SET_BLIP_DISPLAY, blip, 2);
and i still got the exact same error so i’m really confused on this , because even with the simple native that everyone use i got this error , what could cause this ?