NullReferenceException at PlayerDatabase_LoadError
Hi there,

When trying to load the plugin I get the following error:

Failed to call hook 'OnServerInitialized' on plugin 'EnhancedBanSystem v5.2.3' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.EnhancedBanSystem.PlayerDatabase_Load () [0x00054] in <38e2495c8d064c5cb5324564f0c7c67a>:0 
  at Oxide.Plugins.EnhancedBanSystem.OnServerInitialized () [0x0001e] in <38e2495c8d064c5cb5324564f0c7c67a>:0 
  at Oxide.Plugins.EnhancedBanSystem.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x013e2] in <38e2495c8d064c5cb5324564f0c7c67a>: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​
Do you have the PlayerDatabase plugin installed and loaded?

I do, just to be sure I reloaded PlayerDatabase and EnhancedBanSystem again.

(13:00:58) | Loaded plugin PlayerDatabase v1.5.7 by Reneb
(13:01:09) | Unloaded plugin EnhancedBanSystem v5.2.3 by Reneb/Slut
(13:01:09) | Failed to call hook 'OnServerInitialized' on plugin 'EnhancedBanSystem v5.2.3' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.EnhancedBanSystem.PlayerDatabase_Load () [0x00054] in <38e2495c8d064c5cb5324564f0c7c67a>:0 
  at Oxide.Plugins.EnhancedBanSystem.OnServerInitialized () [0x0001e] in <38e2495c8d064c5cb5324564f0c7c67a>:0 
  at Oxide.Plugins.EnhancedBanSystem.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x013e2] in <38e2495c8d064c5cb5324564f0c7c67a>: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
Will look into it later today!
Same problem:
screenshot-691.png
14:17 [Error] Failed to call hook 'OnServerInitialized' on plugin 'EnhancedBanSystem v5.2.3' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.EnhancedBanSystem.PlayerDatabase_Load () [0x00054] in <4e37b40dd8f94755a12e213117112d3b>:0

at Oxide.Plugins.EnhancedBanSystem.OnServerInitialized () [0x0001e] in <4e37b40dd8f94755a12e213117112d3b>:0

at Oxide.Plugins.EnhancedBanSystem.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x013e2] in <4e37b40dd8f94755a12e213117112d3b>: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

download => https://umod.org/plugins/EnhancedBanSystem.cs

with filezilla i get:

20:57 [Error] Unable to load EnhancedBanSystem. EnhancedBanSystem.cs(1636,1): error CS1525: Unexpected symbol `end-of-file'


with webftp:

21:25 [Error] Failed to call hook 'OnServerInitialized' on plugin 'EnhancedBanSystem v5.2.3' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.EnhancedBanSystem.PlayerDatabase_Load () [0x00054] in <4357d5139ad5496fa7fcb4066d21711e>:0 
  at Oxide.Plugins.EnhancedBanSystem.OnServerInitialized () [0x0001e] in <4357d5139ad5496fa7fcb4066d21711e>:0 
  at Oxide.Plugins.EnhancedBanSystem.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x013e2] in <4357d5139ad5496fa7fcb4066d21711e>: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 
21:25 [Info] Loaded plugin EnhancedBanSystem v5.2.3 by Reneb/Slut
Make sure that your FTP client isn’t changing the encoding of the file. This is a common issue with FileZilla for some reason, so I’d suggest trying it as binary when uploading.

The other error means you maybe missing the Player Database plugin.
Transfer> Transfer type> Binary is already set in filezilla.

Player Database is installed...

Protocol: 2153.176.1
Build Date: 03/08/2019 01:20:52
Unity Version: 2018.3.3f1
Changeset: 32894
Branch: release
Oxide.Rust Version: 2.0.4161​
(00:24:05) | Listing 14 plugins:
  01 "Admin Radar" (4.5.4) by nivex (7.82s) - AdminRadar.cs
  02 "BypassQueue" (1.0.1) by Nogrod (0.00s) - BypassQueue.cs
  03 "DiscordMessages" (2.0.1) by Slut (0.03s) - DiscordMessages.cs
  04 "EnhancedBanSystem" (5.2.3) by Reneb/Slut (0.11s) - EnhancedBanSystem.cs
  05 "Godmode" (4.1.1) by Wulf/lukespragg (0.00s) - Godmode.cs
  06 "NameFix" (1.0.1) by Visagalis (0.00s) - NameFix.cs
  07 "No Give Notices" (0.2.0) by Wulf/lukespragg (0.00s) - NoGiveNotices.cs
  08 "PermissionsManager" (0.1.1) by Steenamaroo (0.00s) - PermissionsManager.cs
  09 "PlayerAdministration" (1.3.21) by ThibmoRozier (0.00s) - PlayerAdministration.cs
  10 "PlayerDatabase" (1.5.7) by Reneb (0.00s) - PlayerDatabase.cs
  11 "Spectate" (0.4.3) by Wulf/lukespragg (0.00s) - Spectate.cs
  12 "StrikeSystem" (2.1.3) by LaserHydra (0.00s) - StrikeSystem.cs
  13 "Underworld" (1.0.4) by nivex (0.00s) - Underworld.cs
  14 "Vanish" (0.7.2) by nivex (0.03s) - Vanish.cs​


With webftp, EnhancedBanSystem is loaded but if i'l try to reload, its a fail... 
(00:25:09) | Unloaded plugin EnhancedBanSystem v5.2.3 by Reneb/Slut
(00:25:09) | Failed to call hook 'OnServerInitialized' on plugin 'EnhancedBanSystem v5.2.3' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.EnhancedBanSystem.PlayerDatabase_Load () [0x00054] in <4357d5139ad5496fa7fcb4066d21711e>:0 
  at Oxide.Plugins.EnhancedBanSystem.OnServerInitialized () [0x0001e] in <4357d5139ad5496fa7fcb4066d21711e>:0 
  at Oxide.Plugins.EnhancedBanSystem.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x013e2] in <4357d5139ad5496fa7fcb4066d21711e>: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
(00:25:09) | Loaded plugin EnhancedBanSystem v5.2.3 by Reneb/Slut​


In filezilla, force UTF8, delete plugin, close software, launch and connect with filezilla > upload file :

(00:26:26) | Unloaded plugin EnhancedBanSystem v5.2.3 by Reneb/Slut
(00:26:26) | Failed to call hook 'OnServerInitialized' on plugin 'EnhancedBanSystem v5.2.3' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.EnhancedBanSystem.PlayerDatabase_Load () [0x00054] in <c9e2f977f8e24b398ceaa62e8b9a2d2a>:0 
  at Oxide.Plugins.EnhancedBanSystem.OnServerInitialized () [0x0001e] in <c9e2f977f8e24b398ceaa62e8b9a2d2a>:0 
  at Oxide.Plugins.EnhancedBanSystem.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x013e2] in <c9e2f977f8e24b398ceaa62e8b9a2d2a>: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
(00:26:26) | Loaded plugin EnhancedBanSystem v5.2.3 by Reneb/Slut


so, its player database fault?

That error could potentially be an issue with reading the oxide/data file for the PlayerDatabase plugin. Could you open the file there to see if it's readable?
playerdatabase.db & EnhancedBanSystem_IPs.json have chmod 644, should be 666?
644 is fine.

"644 means that files are readable and writeable by the owner of the file and readable by users in the group owner of that file and readable by everyone else. 755 is the same thing, it just has the execute bit set for everyone."
so, if set true "DataType - PlayerDatabase - use", i got:
 Sqlite handle raised an exception (Exception: Connection is null)
  at Oxide.Core.SQLite.Libraries.SQLite+SQLiteQuery.Handle () [0x0002b] in <227205a880494a0c9119ab3c75690853>:0
(02:55:47) | Sqlite handle raised an exception (Exception: Connection is null)
  at Oxide.Core.SQLite.Libraries.SQLite+SQLiteQuery.Handle () [0x0002b] in <227205a880494a0c9119ab3c75690853>:0​
when i connect to the server.


edit: delete all files on data folder, unload/load plugin:

EnhancedBanSystem_IPs.json.json
EnhancedBanSystem_ID.json

Ive renamed EnhancedBanSystem_IPs.json.json to EnhancedBanSystem_IPs.json and error about Sqlite handle raised an exception (Exception: Connection is null) seems to be fixed

Hi guys. This is what console is saying.

Failed to call hook 'OnServerInitialized' on plugin 'EnhancedBanSystem v5.2.3' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.EnhancedBanSystem.PlayerDatabase_Load () [0x00054] in :0
at Oxide.Plugins.EnhancedBanSystem.OnServerInitialized () [0x0001e] in :0
at Oxide.Plugins.EnhancedBanSystem.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x013e2] 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
14:31:46 Loaded plugin EnhancedBanSystem v5.2.3 by Reneb/Slut
I have enabled SQlite system in config and still not working.