Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Callout crashing LSPDFR when trying to enable a route.

Featured Replies

So I'm making a callout plugin, whenever there is a route enable already or blips which were not removed my plugin decides to crash LSPDFR, so I'm wondering how can I remove the routes that are already enabled or how I can prevent it from crashing.

 

OnCalloutAccepted();


// It gets to here and then crashes before it can log the Enabled route.

police.GetAttachedBlip().EnableRoute(System.Drawing.Color.Red); 
Game.LogTrivial("Enabled route");

And yes the variable police and the blip does exist.

" police = new Vehicle("police", spawnpoint.Around(10f));"

" CalloutUtils.addBlip(police, System.Drawing.Color.Blue);"

 

RagePluginHook.log:

[01/03/2018 13:01:54.823] LSPD First Response: ==============================
[01/03/2018 13:01:54.823] LSPD First Response: UNHANDLED EXCEPTION DURING GAME FIBER TICK
[01/03/2018 13:01:54.823] LSPD First Response: ------------------------------
[01/03/2018 13:01:54.823] LSPD First Response: Origin: Game fiber "CalloutManager".
[01/03/2018 13:01:54.823] LSPD First Response: ------------------------------
[01/03/2018 13:01:54.824] LSPD First Response: Exception type: System.NullReferenceException
[01/03/2018 13:01:54.824] LSPD First Response: Exception message: Object reference not set to an instance of an object.
[01/03/2018 13:01:54.824] LSPD First Response: ------------------------------
[01/03/2018 13:01:54.824] LSPD First Response: Inner exceptions:
[01/03/2018 13:01:54.825] LSPD First Response: ------------------------------
[01/03/2018 13:01:54.825] LSPD First Response: Stack trace:
[01/03/2018 13:01:54.826] LSPD First Response: at BCallouts.Callouts.PursuitAssistance.OnCalloutAccepted()
[01/03/2018 13:01:54.826] at ?????????????????????????????????????????.?????????????????????????????????????????() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:line 338
[01/03/2018 13:01:54.826] at ?????????????????????????????????????????.?????????????????????????????????????????() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:line 173
[01/03/2018 13:01:54.826] at Rage.GameFiber.Main()
[01/03/2018 13:01:54.826] LSPD First Response: ==============================

 

Also before using a Blip or Entity, always check if it is non-null and exists. There's a shorthand way to check this in RPH, just type if(blipVariableName) or if(entityVariableName)

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.