NullRef when clicking a player's nameFixed

just updated my plugin and it goes into main menu but when i click on players name an error come up on consol 

Failed to call hook 'PlayerAdministrationSwitchUICallback' on plugin 'PlayerAdministration v1.6.4' (InvalidCastException: Null object cannot be converted to a value type.)
at System.Convert.ChangeType (System.Object value, System.Type conversionType, System.IFormatProvider provider) [0x00029] in <eae584ce26bc40229c1b1aa476bfa589>:0

at System.Convert.ChangeType (System.Object value, System.Type conversionType) [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0

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

at Oxide.Plugins.PlayerAdministration.AddUserPageInfoLabels (Oxide.Plugins.PlayerAdministration+Cui& aUIObj, System.String aParent, System.UInt64 aPlayerId, BasePlayer& aPlayer) [0x00640] in <54bd2c3be1de4ab796a8ba0c2d9b0702>:0

at Oxide.Plugins.PlayerAdministration.BuildUserPage (Oxide.Plugins.PlayerAdministration+Cui& aUIObj, Oxide.Plugins.PlayerAdministration+UiPage aPageType, System.UInt64 aPlayerId) [0x001ba] in <54bd2c3be1de4ab796a8ba0c2d9b0702>:0

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

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

at Oxide.Plugins.PlayerAdministration.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x01533] in <54bd2c3be1de4ab796a8ba0c2d9b0702>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>: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>:

I'll have a look, it's likely an issue with the newly added godmode integration, should be fixed in a jiffy.

Thanks for reporting, though.

Merged post

Small question, could you share what plugins you dohave on the server? Perhaps there is one that conflicts with one of the optional dependencies.

Merged post

Can't actually really reproduce the issue on my dev server, that's why I'm asking, anyways, 1.6.5 should fix it for you.

i have this too when i click on online Players 

Failed to call hook 'PlayerAdministrationSwitchUICallback' on plugin 'PlayerAdministration v1.6.6' (InvalidCastException: Null object cannot be converted to a value type.)
at System.Convert.ChangeType (System.Object value, System.Type conversionType, System.IFormatProvider provider) [0x00029] in <eae584ce26bc40229c1b1aa476bfa589>:0
2kb/s in, 19kb/s out
at System.Convert.ChangeType (System.Object value, System.Type conversionType) [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0
at Oxide.Core.Plugins.Plugin.Call[T] (System.String hook, System.Object[] args) [0x00008] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
at Oxide.Plugins.PlayerAdministration.BuildUserPage (Oxide.Plugins.PlayerAdministration+Cui& aUIObj, Oxide.Plugins.PlayerAdministration+UiPage aPageType, System.UInt64 aPlayerId) [0x01345] in <dc995af421c14363a8d96ef0c545f0ba>:0
at Oxide.Plugins.PlayerAdministration.BuildUI (BasePlayer aPlayer, Oxide.Plugins.PlayerAdministration+UiPage aPageType, System.String aArg, System.Boolean aIndFiltered) [0x000e5] in <dc995af421c14363a8d96ef0c545f0ba>:0
at Oxide.Plugins.PlayerAdministration.PlayerAdministrationSwitchUICallback (Oxide.Core.Libraries.Covalence.IPlayer aPlayer, System.String aCommand, System.String[] aArgs) [0x001d8] in <dc995af421c14363a8d96ef0c545f0ba>:0
at Oxide.Plugins.PlayerAdministration.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x01533] in <dc995af421c14363a8d96ef0c545f0ba>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>: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 <c2afd8354b8b4f3ca451cf5Failed to call hook 'PlayerAdministrationSwitchUICallback' on plugin 'PlayerAdministration v1.6.6' (InvalidCastException: Null object cannot be converted to a value type.)
at System.Convert.ChangeType (System.Object value, System.Type conversionType, System.IFormatProvider provider) [0x00029] in <eae584ce26bc40229c1b1aa476bfa589>:0
3kb/s in, 20kb/s out
at System.Convert.ChangeType (System.Object value, System.Type conversionType) [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0
at Oxide.Core.Plugins.Plugin.Call[T] (System.String hook, System.Object[] args) [0x00008] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
at Oxide.Plugins.PlayerAdministration.BuildUserPage (Oxide.Plugins.PlayerAdministration+Cui& aUIObj, Oxide.Plugins.PlayerAdministration+UiPage aPageType, System.UInt64 aPlayerId) [0x01345] in <dc995af421c14363a8d96ef0c545f0ba>:0
at Oxide.Plugins.PlayerAdministration.BuildUI (BasePlayer aPlayer, Oxide.Plugins.PlayerAdministration+UiPage aPageType, System.String aArg, System.Boolean aIndFiltered) [0x000e5] in <dc995af421c14363a8d96ef0c545f0ba>:0
at Oxide.Plugins.PlayerAdministration.PlayerAdministrationSwitchUICallback (Oxide.Core.Libraries.Covalence.IPlayer aPlayer, System.String aCommand, System.String[] aArgs) [0x001d8] in <dc995af421c14363a8d96ef0c545f0ba>:0
at Oxide.Plugins.PlayerAdministration.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x01533] in <dc995af421c14363a8d96ef0c545f0ba>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>: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 <c2afd8354b8b4f3ca451cf5

Hmm, interesting.. I'll look again then

Merged post

@tobse Could you share if you have a plugin called Godmode and share it's version please?
That bit of code should only execute when there is a plugin called Godmode available, I'll see if I can add more checks to be sure it's Godmode from this site (https://umod.org/plugins/godmode).

Perhaps someone made some other version that's not on uMod or not version v4.2.9 that's messing with the implementation... Would be real annoying if that's the case.

I'm still at work at the moment. I check it out as soon as I get home. I just saw through my root server app that I had godmode 4.2.8. I will install and test the latest version afterwards. then I'll get in touch. best regards

Merged post

now it works, thx

Hello ThibmoRozier, I have the same isue wen i launch the plugin.

 

(08:57:19) | Failed to call hook 'PlayerAdministrationUICallback' on plugin 'PlayerAdministration v1.6.7' (JsonReaderException: After parsing a value an unexpected character was encountered: ". Path '['Godmode Not Installed Button Text']', line 82, position 2.)
at Newtonsoft.Json.JsonTextReader.ParsePostValue () [0x00179] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.JsonTextReader.Read () [0x0005a] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary (System.Collections.IDictionary dictionary, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonDictionaryContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id) [0x0028b] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x002a8] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x0006d] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x000d9] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00053] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x0002d] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value) [0x00000] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Oxide.Core.Libraries.Lang.GetMessageFile (System.String plugin, System.String lang) [0x00067] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0

at Oxide.Core.Libraries.Lang.GetMessageKey (System.String key, Oxide.Core.Plugins.Plugin plugin, System.String lang) [0x00036] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0

at Oxide.Core.Libraries.Lang.GetMessage (System.String key, Oxide.Core.Plugins.Plugin plugin, System.String userId) [0x00017] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0

at Oxide.Plugins.PlayerAdministration.BuildTabMenu (Oxide.Plugins.PlayerAdministration+Cui& aUIObj, Oxide.Plugins.PlayerAdministration+UiPage aPageType) [0x00054] in <36fe0e12b0174fac946e72cc1d3357ff>:0

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

at Oxide.Plugins.PlayerAdministration.PlayerAdministrationUICallback (Oxide.Core.Libraries.Covalence.IPlayer aPlayer, System.String aCommand, System.String[] aArgs) [0x00083] in <36fe0e12b0174fac946e72cc1d3357ff>:0

at Oxide.Plugins.PlayerAdministration.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x01226] in <36fe0e12b0174fac946e72cc1d3357ff>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>: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

You seem to be missing a comma in your language file. Try adding it or removing the language file so it regenerates it.

HrNurOe6rh4gX8j.png ThibmoRozier

You seem to be missing a comma in your language file. Try adding it or removing the language file so it regenerates it.

Indeed, it lacked a comma in my Language F file.

Thank you very much, the problem has been solved. :)

Salikoko

Indeed, it lacked a comma in my Language F file.

No worries man, hope you enjoy. :)
lDS9pMQumzxX3qt.png ThibmoRozier
No worries man, hope you enjoy. :)

Sure !

Thank again and nice Job for the plugin !

Locked automatically