Getting a few errors, here they are.
Screenshot
Having trouble with it noticing and reading from my config.json file... The format is fine, code seems to be fine... Could someone check over this and see if there is anything i'm missing?
And here is my json code.Code:static public void LoadJson() { using (StreamReader r = new StreamReader("config.json")) { string json = r.ReadToEnd(); List<JsonList> items = JsonConvert.DeserializeObject<List<JsonList>>(json); jsonlist = items[0]; } } [ChatCommand("RustyRockets")] void RustyRocket(BasePlayer player, string command, string[] args) { player.GiveItem(ItemManager.CreateByItemID(649603450, jsonlist.RocketLauncherCount)); //Rocket Launcher Count player.GiveItem(ItemManager.CreateByItemID(498591726, jsonlist.C4Count)); //C4 Count player.GiveItem(ItemManager.CreateByItemID(1578894260, jsonlist.RocketCount)); //Rocket Count SendReply(player, jsonlist.Message); }
Code:[ { "RepeatInterval": "10", //How many seconds until the server spawns rockets for everyone again. "RocketCount": "100", //How many rockets you get. "C4Count": "100", //How many C4 you get. "RocketLauncherCount": "1" //How many rocket launchers you get. } ]
NullReferenceException: Object reference not set to an instance of an object
Discussion in 'Rust Development' started by Tann3r, Jun 22, 2017.
-
I saw in your original plugin that you were using the System.IO namespace, which you can't use via Oxide plugins. I suggest you look at some other plugins and familiarize your self with the configuration helper.
-
Wulf Community Admin
-
-
Wulf Community Admin
-
-
Wulf Community Admin
-
-
Wulf Community Admin