Hey,
My server just wiped and wanted to update the config with new dates, after removing the oldest date (07/07/2022 in my case) I've got this error on plugin load:
Failed to initialize plugin 'WipeDates v1.0.3' (InvalidOperationException: Sequence contains no elements) at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00010] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at Oxide.Plugins.WipeDates.calculate_wipe_dates () [0x000a6] in <cad732cc3fba4997b44b9b8e5ff7ae73>:0 at Oxide.Plugins.WipeDates.Init () [0x00011] in <cad732cc3fba4997b44b9b8e5ff7ae73>:0 at Oxide.Plugins.WipeDates.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00038] in <cad732cc3fba4997b44b9b8e5ff7ae73>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <cc99cb05b42e4ea494cdf294badea406>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <99d545163fdd4d57a562df7989f2ca0a>:0 at Oxide.Core.Plugins.CSPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00043] in <99d545163fdd4d57a562df7989f2ca0a>:0
Only happens when I remove the oldest date.
Problem replacing wipe datesSolved
Make sure you have always minimum 1 Date from the past and 1 from the future in the config
@freakyy that is the problem, I did have one in the past and one in the future. To temp fix this issue I had to keep the original date in the array, it looks like this now for it to work:
"All_Wipe_Dates": [
"07/29/2022 20:00:00",
"08/12/2022 20:00:00",
"07/07/2022 20:00:00"
],
{
"All_Wipe_Dates": [
"07/29/2022 20:00:00",
"08/12/2022 20:00:00"
],
"Date_Format": "MM/dd/yyyy HH:mm",
"Last_Wipe_Message": "Last wipe was:",
"Next_Wipe_Message": "Next wipe will happen:",
"Send_Message_On_User_Wake_Up": true,
"Server_Timezone": "CET"
}This is my config and I works for me :/ https://gyazo.com/e2e79aa0b88ebcfaf7e195f78e70bc6a
Locked automatically