NullReferenceException at HasPermissionFixed

Hello

I fail to call helicopter by RCON.

That what happen:

Failed to call hook 'SpawnMyMinicopterConsoleCommand' on plugin 'MyMiniCopter v0.1.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.MyMiniCopter.HasPermission (ConsoleSystem+Arg arg, System.String permname) [0x00006] in <fc01f9cbc78842249726ae9d5f577020>:0 
  at Oxide.Plugins.MyMiniCopter.SpawnMyMinicopterConsoleCommand (ConsoleSystem+Arg arg) [0x00000] in <fc01f9cbc78842249726ae9d5f577020>:0 
  at Oxide.Plugins.MyMiniCopter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x006bb] in <fc01f9cbc78842249726ae9d5f577020>: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 


That work well with ver 0.0.9

Thanks for you job :)

Should work as designed in 0.1.1.  The console commands require a SteamId to be passed.  This may or may not be new functionality but should match the documentation.
5ba5bf1da6b60.jpg rfc1920
Should work as designed in 0.1.1.  The console commands require a SteamId to be passed.  This may or may not be new functionality but should match the documentation.

Thanks, atm i use ver 0.0.9 and work well with steamid.

Anyway to make helicopter decaying instead of not ?



Merged post

I try 1.0.1

Look like not fixed for RCON ask

Failed to call hook 'SpawnMyMinicopterConsoleCommand' on plugin 'MyMiniCopter v0.1.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.MyMiniCopter.HasPermission (ConsoleSystem+Arg arg, System.String permname) [0x00006] in <279572af298a40d9969e173508214d23>:0 
  at Oxide.Plugins.MyMiniCopter.SpawnMyMinicopterConsoleCommand (ConsoleSystem+Arg arg) [0x00000] in <279572af298a40d9969e173508214d23>:0 
  at Oxide.Plugins.MyMiniCopter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00656] in <279572af298a40d9969e173508214d23>: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 
Failed to call hook 'SpawnMyMinicopterConsoleCommand' on plugin 'MyMiniCopter v0.1.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.MyMiniCopter.HasPermission (ConsoleSystem+Arg arg, System.String permname) [0x00006] in <279572af298a40d9969e173508214d23>:0 
  at Oxide.Plugins.MyMiniCopter.SpawnMyMinicopterConsoleCommand (ConsoleSystem+Arg arg) [0x00000] in <279572af298a40d9969e173508214d23>:0 
  at Oxide.Plugins.MyMiniCopter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00656] in <279572af298a40d9969e173508214d23>: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 
​
there is a bug with update from today

consolecommand dont work
spawnminicopter steam64id

please fix it

 

Failed to call hook 'SpawnMyMinicopterConsoleCommand' on plugin 'MyMiniCopter v0.1.1' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.MyMiniCopter.HasPermission (ConsoleSystem+Arg arg, System.String permname) [0x00006] in :0
at Oxide.Plugins.MyMiniCopter.SpawnMyMinicopterConsoleCommand (ConsoleSystem+Arg arg) [0x00000] in :0
at Oxide.Plugins.MyMiniCopter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00722] in :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
last version that the console command
spawnminicopter steam64 id
works is v.0.0.9

pls fix it in newest version too
thanks
In that case there is no player for whom to check permission, I guess.   Will see what I can do but it's likely it won't work unless a configurable spawn user is used, or just an rcon check, etc.
5ba5bf1da6b60.jpg rfc1920
In that case there is no player for whom to check permission, I guess.   Will see what I can do but it's likely it won't work unless a configurable spawn user is used, or just an rcon check, etc.

I'd do a permission check only if the user is not null; otherwise you can check if a connection exists or not.

Additional checking for rcon has been added in 0.1.2.
Thanks for your work.
Will try it soon :)
thanks for the update

all works now
Locked automatically