when I try to store data on a DataFile using:it says that Interface does not exist in the current context, must I do something to create the file before i use this code?Code:Interface.GetMod().DataFileSystem.WriteObject("MyDataFile", storedData);
DataFile c#
Discussion in 'Rust Development' started by cibal, Aug 19, 2015.
-
Show us your code..
-
This is code :
http://pastebin.com/zt9uDW0B -
Calytic Community Admin Community Mod
I don't see a WriteObject call in that code?
-
And i dont see a credit in that code :x + Developer Name
-
I have tried to create it on plugin init:
Code:[Info("SaveData", "developer", "0.0.1")] [Description("Save data on a data file into oxide/data")] class HitMarker : RustPlugin{ static Dictionary<ulong, bool> PlayersData; void Init(){ try { PlayersData = Interface.GetMod().DataFileSystem.ReadObject<PlayersData>("HitMarkerData"); } catch { } if (PlayersData == null) PlayersData = new Dictionary<ulong, boolean>(); } }
