Jump to content

Error

Closed 0.5.0 0.5.1

Sirphr
Sirphr

Posted

(00:30:47) | Failed to call hook 'OnPlayerInput' on plugin 'MyMiniCopter v0.5.0' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.MyMiniCopter.OnPlayerInput (BasePlayer player, InputState input) [0x00013] in <1c11c1985a7f4ea585ef75ced9c2f25b>:0

at Oxide.Plugins.MyMiniCopter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001d7] in <1c11c1985a7f4ea585ef75ced9c2f25b>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <ccbecb1690ac40048b5b01f4ad263c1c>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <157a94ee66ab4a7991faecd1eb84be3b>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <157a94ee66ab4a7991faecd1eb84be3b>:0

 

RFC1920

Posted

Changed Status from Pending to Closed

Changed Fixed In to Next Version

  • Confused 1
Sirphr

Posted

Failed to call hook 'OnPlayerInput' on plugin 'MyMiniCopter v0.5.1' (NullReferenceException: Object reference not set to an instance of an object)

  at Oxide.Plugins.MyMiniCopter.OnPlayerInput (BasePlayer player, InputState input) [0x00013] in <57b9953c67e94e658c8bc30012a98a37>:0 

  at Oxide.Plugins.MyMiniCopter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001d7] in <57b9953c67e94e658c8bc30012a98a37>:0 

  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <ccbecb1690ac40048b5b01f4ad263c1c>:0 

  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <157a94ee66ab4a7991faecd1eb84be3b>:0 

  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <157a94ee66ab4a7991faecd1eb84be3b>:0 

RFC1920

Posted

Try a new config file.  I don't see why this would be happening.

Sirphr

Posted

I think that did it or me deleting data file

Sirphr

Posted

I still get the error when the server restarts. I have to reload the plugin to get it to work.

This is my config

{
  "Global": {
    "allowWhenBlocked": false,
    "allowRespawnWhenActive": false,
    "useCooldown": true,
    "useNoEscape": true,
    "useFriends": false,
    "useClans": true,
    "useTeams": false,
    "copterDecay": false,
    "allowDamage": true,
    "killOnSleep": false,
    "allowFuelIfUnlimited": false,
    "allowDriverDismountWhileFlying": true,
    "allowPassengerDismountWhileFlying": true,
    "debug": false,
    "StopEngineOnGMini": false,
    "stdFuelConsumption": 0.25,
    "cooldownmin": 10.0,
    "mindistance": 0.0,
    "gminidistance": 0.0,
    "minDismountHeight": 7.0,
    "startingFuel": 100.0,
    "Prefix": "[My MiniCopter]: ",
    "TimedHover": false,
    "DisableHoverOnDismount": true,
    "EnableRotationOnHover": true,
    "PassengerCanToggleHover": false,
    "HoverWithoutEngine": false,
    "UseFuelOnHover": true,
    "HoverDuration": 60.0,
    "UseKeystrokeForHover": false,
    "HoverKey": 134217728
  },
  "Version": {
    "Major": 0,
    "Minor": 5,
    "Patch": 1
  },
  "VIPSettings": {}
}

 

RFC1920

Posted

You might try modifying the function to include a new line:

        private void OnPlayerInput(BasePlayer player, InputState input)
        {
            if (player == null || input == null) return;
            if (!player.userID.IsSteamId()) return; // ADD THIS LINE
            if (!configData.Global.UseKeystrokeForHover) return;

The only reason this might be a problem is if some NPC plugin is somehow triggering this.  I only suggest this because it's not clear when it is happening.  Is it during boot or only when an actual player first connects, tries to the use a copter, etc.

 

CyberWarden

Posted

I'm seeing this error on start.

[Error] Failed to call hook 'CanMountEntity' on plugin 'MyMiniCopter v0.5.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.MyMiniCopter.DoLog (System.String message) [0x00000] in <2a015dcc8f374eddb334e5fddc085478>:0 
  at Oxide.Plugins.MyMiniCopter.CanMountEntity (BasePlayer player, BaseMountable mountable) [0x00060] in <2a015dcc8f374eddb334e5fddc085478>:0 
  at Oxide.Plugins.MyMiniCopter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0062e] in <2a015dcc8f374eddb334e5fddc085478>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <d431e37658ba4727b7490299d12dfc44>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <157a94ee66ab4a7991faecd1eb84be3b>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <157a94ee66ab4a7991faecd1eb84be3b>:0 

 

RFC1920

Posted

That is a different error and this ticket has been closed.

1.4m

Downloads

Total number of downloads.

6.8k

Customers

Total customers served.

101.5k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.