Everything's fine and I fixed the code! Thanks for everyone who helped me with this issue!
yoni1857
View profile on GTA5-Mods.com »
Posts made by yoni1857
-
RE: NullRefernceException runtime error but no build errors [ScriptHookVDotNet]
-
RE: NullRefernceException runtime error but no build errors [ScriptHookVDotNet]
Okay so I rewrote the whole code and now everything kinda works but the only problem is that the blip disappears once it's out of the player's FoV even though I set
newBlip.IsShortRange
to false.Here's the new code: https://pastebin.com/b1SgBL4B
-
RE: NullRefernceException runtime error but no build errors [ScriptHookVDotNet]
@Jitnaught So I added
UI.ShowSubtitle(Target.ToString());
UnderTarget = Game.Player.GetTargetedEntity();
and it said GTA.Vehicle (was a car) so that worked. -
RE: NullRefernceException runtime error but no build errors [ScriptHookVDotNet]
@Jitnaught I added UI.ShowSubtitle(newBlip.toString()); under Blip newBlip = Target.addBlip(); and it did nothing
-
RE: NullRefernceException runtime error but no build errors [ScriptHookVDotNet]
@Jitnaught Okay so I've got good news and bad news.
Good news: No Errors from the script.
Bad news: The blip doesn't show up. -
RE: NullRefernceException runtime error but no build errors [ScriptHookVDotNet]
So I combined @ikt and @Jitnaught 's code and i'm still getting the same error.
[ERROR] Caught unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object. at TrackersV.TrackersV.AddPlayerBlip() at TrackersV.TrackersV.OnKeyDown(Object source, KeyEventArgs e) at GTA.Script.raise_KeyDown(Object value0, KeyEventArgs value1) at GTA.Script.MainLoop()
-
RE: NullRefernceException runtime error but no build errors [ScriptHookVDotNet]
@ikt Still same error:
system.NullReferenceException: Object reference not set to an instance of an object.
at TrackersV.TrackersV.AddPlayerBlip()
at TrackersV.TrackersV.OnKeyDown(Object source, KeyEventArgs e)
at GTA.Script.raise_KeyDown(Object value0, KeyEventArgs value1)
at GTA.Script.MainLoop()