NullReferenceException at GetLicencedPlayerFixed
what is the cause of the error?    

Failed to run a 300.00 timer in 'VehicleLicence v1.2.1' 
(NullReferenceException: Object reference not set to an instance of an 
object)
  at Oxide.Plugins.VehicleLicence.GetLicencedPlayer 
(Oxide.Plugins.VehicleLicence+Vehicle vehicle) [0x0000c] in :0
  at Oxide.Plugins.VehicleLicence.CheckVehicles () [0x00084] in :0
  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <4452f821def6406d834e4149849fe7ea>:0

Hi,

Please send your config files :).

In response to Sorrow ():
Hi,Please send your config files :).
{
  "Define your licence settings": {
    "Interval in minutes to check vehicle for wipe": 5,
    "Time before vehicle wipe in minutes": 10,
    "Use Economics to buy vehicles": false,
    "Use ServerRewards to buy vehicles": true,
    "Shortname of item needed to buy vehicles": "scrap",
    "Use permissions for chat commands": false
  },
  "Define your vehicles options": {
    "RowBoat": {
      "name": "Row Boat",
      "prefab": "assets/content/vehicles/boats/rowboat/rowboat.prefab",
      "purchasable": true,
      "price": 0,
      "cooldownToSpawn": 180,
      "distanceToSpawn": 3,
      "commands": [
        "row",
        "rowboat"
      ]
    },
    "RHIB": {
      "name": "RHIB",
      "prefab": "assets/content/vehicles/boats/rhib/rhib.prefab",
      "purchasable": true,
      "price": 0,
      "cooldownToSpawn": 300,
      "distanceToSpawn": 10,
      "commands": [
        "rhib"
      ]
    },
    "Sedan": {
      "name": "Sedan",
      "prefab": "assets/content/vehicles/sedan_a/sedantest.entity.prefab",
      "purchasable": true,
      "price": 0,
      "cooldownToSpawn": 180,
      "distanceToSpawn": 5,
      "commands": [
        "sedan",
        "car"
      ]
    },
    "HotAirBalloon": {
      "name": "Hot Air Balloon",
      "prefab": "assets/prefabs/deployable/hot air balloon/hotairballoon.prefab",
      "purchasable": false,
      "price": 20,
      "cooldownToSpawn": 900,
      "distanceToSpawn": 20,
      "commands": [
        "hotairballoon",
        "hab"
      ]
    },
    "MiniCopter": {
      "name": "MiniCopter",
      "prefab": "assets/content/vehicles/minicopter/minicopter.entity.prefab",
      "purchasable": true,
      "price": 80,
      "cooldownToSpawn": 1800,
      "distanceToSpawn": 8,
      "commands": [
        "minicopter",
        "copter"
      ]
    },
    "Chinook": {
      "name": "Chinook",
      "prefab": "assets/prefabs/npc/ch47/ch47.entity.prefab",
      "purchasable": true,
      "price": 3500,
      "cooldownToSpawn": 33000,
      "distanceToSpawn": 25,
      "commands": [
        "chinook",
        "ch47"
      ]
    }
  }
}
I'm trying to find the error, but I can't reproduce it. Would you be at what point this error appears? When you call a vehicle back or try to make a new one appear?

Merged post

If you change cooldownToSpawn for RHIB to 301 for exemple, do you have error with 
Failed to run a 301.00 timer
?
In response to Sorrow ():
I'm trying to find the error, but I can't reproduce it. Would you be at what point this error appear...
is revealed when recalled on all vehicles.

(15:57:56) | Failed to run a 300.00 timer in 'VehicleLicence v1.2.1' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.VehicleLicence.GetLicencedPlayer (Oxide.Plugins.VehicleLicence+Vehicle vehicle) [0x0000c] in <4c36f6325dc44b13a73054c5cffb4b99>:0

at Oxide.Plugins.VehicleLicence.CheckVehicles () [0x00084] in <4c36f6325dc44b13a73054c5cffb4b99>:0

at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <4452f821def6406d834e4149849fe7ea>:0

Failed to call hook 'CmdSpawnVehicle' on plugin 'VehicleLicence v1.2.1' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.VehicleLicence.IsCase (System.String arg, System.String prefab) [0x00007] in <159a6a850ec44e2f9bd43b0feca68f50>:0
at Oxide.Plugins.VehicleLicence.CmdSpawnVehicle (BasePlayer player, System.String command, System.String[] args) [0x000a6] in <159a6a850ec44e2f9bd43b0feca68f50>:0
at Oxide.Plugins.VehicleLicence.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0040d] in <159a6a850ec44e2f9bd43b0feca68f50>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0
{
  "Define your licence settings": {
    "Interval in minutes to check vehicle for wipe": 5,
    "Time before vehicle wipe in minutes": 15,
    "Use Economics to buy vehicles": true,
    "Use ServerRewards to buy vehicles": false,
    "Shortname of item needed to buy vehicles": "scrap",
    "Use permissions for chat commands": false
  },
  "Define your vehicles options": {
    "RowBoat": {
      "name": "Row Boat",
      "prefab": "assets/content/vehicles/boats/rowboat/rowboat.prefab",
      "purchasable": true,
      "price": 500,
      "cooldownToSpawn": 180,
      "distanceToSpawn": 3,
      "commands": [
        "row",
        "rowboat"
      ]
    },
    "RHIB": null,
    "Sedan": null,
    "HotAirBalloon": null,
    "MiniCopter": {
      "name": "MiniCopter",
      "prefab": "assets/content/vehicles/minicopter/minicopter.entity.prefab",
      "purchasable": true,
      "price": 1000,
      "cooldownToSpawn": 1800,
      "distanceToSpawn": 8,
      "commands": [
        "minicopter",
        "copter"
      ]
    },
    "Chinook": null
  }
}

Getting this issue with /buy copter. 

Any ideas? Thanks

00:02 [Error] Failed to run a 300.00 timer in 'VehicleLicence v1.2.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.VehicleLicence.GetLicencedPlayer (Oxide.Plugins.VehicleLicence+Vehicle vehicle) [0x0000c] in <0f5ebba06b5145da8d14bae486287cfc>:0 
  at Oxide.Plugins.VehicleLicence.CheckVehicles () [0x00084] in <0f5ebba06b5145da8d14bae486287cfc>:0 
  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <4452f821def6406d834e4149849fe7ea>:0 
Not sure if this is a problem but I keep noticing this in my mornign restarts ....

Failed to call hook 'Unload' on plugin 'VehicleLicence v1.2.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.VehicleLicence.GetLicencedPlayer (Oxide.Plugins.VehicleLicence+Vehicle vehicle) [0x0000c] in <6a5c4f2a445f47b8be4d37111db3e9c5>:0 
  at Oxide.Plugins.VehicleLicence.Unload () [0x00027] in <6a5c4f2a445f47b8be4d37111db3e9c5>:0 
  at Oxide.Plugins.VehicleLicence.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00329] in <6a5c4f2a445f47b8be4d37111db3e9c5>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0 
Calling 'Unload' on 'UpLifted v1.2.12' took 141ms
Unloaded plugin UpLifted v1.2.12 by FuJiCuRa
Unloaded plugin Vanish v0.7.4 by nivex
Failed to call hook 'Unload' on plugin 'VehicleLicence v1.2.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.VehicleLicence.GetLicencedPlayer (Oxide.Plugins.VehicleLicence+Vehicle vehicle) [0x0000c] in <6a5c4f2a445f47b8be4d37111db3e9c5>:0 
  at Oxide.Plugins.VehicleLicence.Unload () [0x00027] in <6a5c4f2a445f47b8be4d37111db3e9c5>:0 
  at Oxide.Plugins.VehicleLicence.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00329] in <6a5c4f2a445f47b8be4d37111db3e9c5>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0 ​
I believe that I have addressed this in my last release. Please check and see.
Locked automatically