PlayerAdministrationSwitchUICallbackFixed

When i try to offline ban player.

(14:42:02) | Failed to call hook 'PlayerAdministrationSwitchUICallback' on plugin 'PlayerAdministration v1.6.2' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.PlayerAdministration.BuildUserPage (Oxide.Plugins.PlayerAdministration+Cui& aUIObj, Oxide.Plugins.PlayerAdministration+UiPage aPageType, System.UInt64 aPlayerId) [0x0015f] in <3e8f663c7c004aee95618e7ccdd1e486>:0

  at Oxide.Plugins.PlayerAdministration.BuildUI (BasePlayer aPlayer, Oxide.Plugins.PlayerAdministration+UiPage aPageType, System.String aArg, System.Boolean aIndFiltered) [0x000c1] in <3e8f663c7c004aee95618e7ccdd1e486>:0

  at Oxide.Plugins.PlayerAdministration.PlayerAdministrationSwitchUICallback (Oxide.Core.Libraries.Covalence.IPlayer aPlayer, System.String aCommand, System.String[] aArgs) [0x001dd] in <3e8f663c7c004aee95618e7ccdd1e486>:0

  at Oxide.Plugins.PlayerAdministration.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0148b] in <3e8f663c7c004aee95618e7ccdd1e486>:0

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

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

  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
[Error] Failed to call hook 'PlayerAdministrationSwitchUICallback' on plugin 'PlayerAdministration v1.6.2' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.PlayerAdministration.BuildUserPage (Oxide.Plugins.PlayerAdministration+Cui& aUIObj, Oxide.Plugins.PlayerAdministration+UiPage aPageType, System.UInt64 aPlayerId) [0x0015f] in <2d22b0f8f794483089fb56d0795f280d>:0

at Oxide.Plugins.PlayerAdministration.BuildUI (BasePlayer aPlayer, Oxide.Plugins.PlayerAdministration+UiPage aPageType, System.String aArg, System.Boolean aIndFiltered) [0x000c1] in <2d22b0f8f794483089fb56d0795f280d>:0

at Oxide.Plugins.PlayerAdministration.PlayerAdministrationSwitchUICallback (Oxide.Core.Libraries.Covalence.IPlayer aPlayer, System.String aCommand, System.String[] aArgs) [0x001dd] in <2d22b0f8f794483089fb56d0795f280d>:0

at Oxide.Plugins.PlayerAdministration.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0148b] in <2d22b0f8f794483089fb56d0795f280d>:0

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

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

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

@PhPho3niX90 Will have to fix this, as I no longer maintain this plugin, but it would be amazingly helpful if you enable debug mode and send the log.
You can enable debug mode by changing "CDebugEnabled" to "true" on line 1878 in the curent version.

Without the debug log it's very hard to troubleshoot this, sadly. Due to the high amount of code in the "BuildUserPage" procedure.

Could you also explain the situation? (Clicked on an online user, clicked on a banned user, clicked on a dead user, clicked on a sleeping user...)

Merged post

Meanwhile, I did a couple of fixes, might wanne give them a try:
https://github.com/thibmo/PlayerAdministration/releases/tag/1.6.03

sorry for not reply, i will test it right now 

zFALQvqRcMEHNqe.png ThibmoRozier

@PhPho3niX90 Will have to fix this, as I no longer maintain this plugin

Sure looks like you are trying to maintain it still. :p
rCMtAGpVWPqbeEj.jpg Wulf
Sure looks like you are trying to maintain it still. :p
Haha, just had some time to cool down after overworking myself. :D

Merged post

As for the motivation to make this patch, I saw that the forum section for it was stale for 2+ months so yeah.. More a service to the users then anything else, really.
Locked automatically