1. 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?

    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);
            }
    
    And here is my json code.

    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.
      }
    ]
     
  2. 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. :)
     
  3. Wulf

    Wulf Community Admin

    I'm pretty sure that was just a broad copy/paste of using statements. ;)
     
  4. Well it was the premade using statements plus some statements I thought I had to use... Wasn't familiar with everything I couldn't use, and Why can't I use the System.IO namespace? Seems to work perfectly fine with it in, but as soon as I add in the json code it goes to hell :p
     
  5. Wulf

    Wulf Community Admin

    Most of System.IO is blacklisted to prevent malicious use in plugins on shared hosts. JSON wouldn't be related to System.IO.
     
  6. I can use System.IO if I close my game while trying to load the plugin... Should I not be able to or something? If I leave the game running it says I'm not allowed to use system.io.textreader
     
  7. Wulf

    Wulf Community Admin

    What you do on the server is unrelated to your game client.
     
  8. Are there any alternatives to StreamReader that could work in this case?
     
  9. Wulf

    Wulf Community Admin

    What exactly do you need StreamReader for? If you want to make a config, look at the Config API that Oxide provides. There's no need to manually read a JSON file in a plugin as suggested previously.