2.1.7 resets data file on restart

since the 2.1.7 update this plugin is resetting the data file on restart.

can you please provide a bug fix or allow another developer take over maintainance

This last change log is not working:
* - Cupboard balances are now saved upon plugin unload as well as server save

Merged post

The code is not creating a data file which is why it resets on a restart.

private void SaveTcBalances()
{
if (config.Settings.UseEconomics || config.Settings.UseRP)
{
Dictionary<uint, float> balances = ProtectedCupboard.toolcupboards.Values.ToDictionary(x => x.Priv.net.ID, x => x.StoredBalance);
Interface.Oxide.DataFileSystem.WriteObject("CupboardBalances", balances);
Debug($"Saved {balances.Count} balances");
}
}



Merged post

Failed to run a 0.10 timer in 'RaidProtection v2.1.7' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.RaidProtection+ProtectedCupboard.UpdateTotalBuildingCost () [0x00123] in <3eea331190ab44b6a816e17b1b3ebdca>:0

at Oxide.Plugins.RaidProtection+<OnEntityKill>c__AnonStorey4.<>m__0 () [0x0000b] in <3eea331190ab44b6a816e17b1b3ebdca>:0

at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <50629aa0e75d4126b345d8d9d64da28d>:0

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

yes, when the server is restarted, the balance is discarded, a fix is needed

Merged post

by the way, if you use srap, then there are no problems with rebooting and erasing

This is not fixed yet with Economics and Server Rewards. As soon the Server gets restarted, the Raid Protection is gone. It is incredible annoying and let people not use it anymore...

Merged post

It seems the file is still there with correct settings after Restart. But somehow it doesn't work. Got alot reports about raided bases who had enough RPs into int.