Failed to call hook 'OnServerInitialized' on pluginSolved

Hi, I completely deleted the plugin beforehand (Data, Config, Plugin) and got this error message during installation

 

(19:13:34) | Failed to call hook 'OnServerInitialized' on plugin 'GuardedCrate v1.8.6' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Game.Rust.Libraries.Command.AddConsoleCommand (System.String command, Oxide.Core.Plugins.Plugin plugin, System.Func`2[T,TResult] callback) [0x00034] in <cec9a617ead943dd8cb9e248810c524b>:0

at Oxide.Game.Rust.Libraries.Command.AddConsoleCommand (System.String command, Oxide.Core.Plugins.Plugin plugin, System.String callback) [0x00014] in <cec9a617ead943dd8cb9e248810c524b>:0

at Oxide.Plugins.GuardedCrate.OnServerInitialized () [0x00000] in <bd1863fca4ff47eabbbfbcaaf5597050>:0

at Oxide.Plugins.GuardedCrate.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00360] in <bd1863fca4ff47eabbbfbcaaf5597050>:0

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

one moment will check this out for you

Merged post

please could you verify your config files looks like this please.

{
"command name": "gcrate",
"enable auto spawning events": true,
"auto start event after x duration": 3600.0,
"message notification settings": {
"enable toast message": false,
"enable chat message": true,
"enable chat prefix": true,
"custom chat message icon (steam64)": 76561199542824781,
"enable gui announcements plugin from umod.org": false,
"gui announcements text color": "White",
"gui announcements background color": "Purple"
}
}


Merged post

all data config and lang files must be removed before loading the plugin, this would indicate the config was invalid and needs updating.

The config looks like this

 

{
"EnableAutoStart (enables events to spawn automatically)": true,
"EventDuration (time between event spawns)": 420.0,
"EnableNotifications (enables events notifications)": false,
"Spawn distance from bases": 30.0,
"Command (command name)": [
"gc"
],
"EffectiveWeaponRange (range weapons will be effective)": {
"snowballgun": 60.0,
"rifle.ak": 150.0,
"rifle.bolt": 150.0,
"bow.hunting": 30.0,
"bow.compound": 30.0,
"crossbow": 30.0,
"shotgun.double": 10.0,
"pistol.eoka": 10.0,
"multiplegrenadelauncher": 50.0,
"rifle.l96": 150.0,
"rifle.lr300": 150.0,
"lmg.m249": 150.0,
"rifle.m39": 150.0,
"pistol.m92": 15.0,
"smg.mp5": 80.0,
"pistol.nailgun": 10.0,
"shotgun.waterpipe": 10.0,
"pistol.python": 60.0,
"pistol.revolver": 50.0,
"rocket.launcher": 60.0,
"shotgun.pump": 10.0,
"pistol.semiauto": 30.0,
"rifle.semiauto": 100.0,
"smg.2": 80.0,
"shotgun.spas12": 30.0,
"speargun": 10.0,
"smg.thompson": 30.0
}
}



Merged post

OK, I deleted everything again, this time it worked.
Thank you
Locked automatically