17:05 [Error] Failed to call hook 'OnEntityKill' on plugin 'BoatLicence v0.2.1' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.BoatLicence.OnEntityKill (BaseNetworkable entity) [0x0000c] in <59804f3c1ebe48a19c5b21d1391f67b4>:0 at Oxide.Plugins.BoatLicence.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00251] in <59804f3c1ebe48a19c5b21d1391f67b4>: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
NullReferenceException at OnEntityKillFixed
Hi,
I look this but i don't understand why this exception is throw.
Community you have an idea ?
I'm looking more closely at it tonight when I get home.
Merged post
I don't understand how this happens I tried to reproduce it, it was unsuccessful.
I look this but i don't understand why this exception is throw.
Community you have an idea ?
private void OnEntityKill(BaseNetworkable entity)
{
LisencedPlayer lisencedPlayer;
if (entity == null || !_boatsCache.TryGetValue(entity.net.ID, out lisencedPlayer)) return;
lisencedPlayer.ResetBoat(entity.net.ID);
_boatsCache.Remove(entity.net.ID);
}I'm looking more closely at it tonight when I get home.
Merged post
I don't understand how this happens I tried to reproduce it, it was unsuccessful.
In response to Wulf ():Add some debug output to see if entity or entity.net is null in each usage. Also check to make sure...
After a lot of tests Pur3x doesn't seem to have any more errors after deleting its configuration and data file. We're waiting to see if he gets the error again. On my side, locally and online, I didn't succeed in reproducing it.
Merged post
Fixed https://umod.org/plugins/boat-licence#documentation
Merged post
Fixed https://umod.org/plugins/boat-licence#documentation
Locked automatically