Permissions issue
{
  "Commands": [
    "skin",
    "skins"
  ],
  "Skins": [
    {
      "Item Shortname": "rifle.ak",
      "Permission": "",
      "Skins": [
        958707939
      ]
    },
    {
      "Item Shortname": "rifle.ak",
      "Permission": "",
      "Skins": [
        1533789603
      ]
    },
    {
      "Item Shortname": "shoes.boots",
      "Permission": "skins.test",
      "Skins": [
        613481881
      ]
    }
  ],
  "Container Panel Name": "generic",
  "Container Capacity": 36,
  "UI": {
    "Background Color": "0.18 0.28 0.36",
    "Background Anchors": {
      "Anchor Min X": "1.0",
      "Anchor Min Y": "1.0",
      "Anchor Max X": "1.0",
      "Anchor Max Y": "1.0"
    },
    "Background Offsets": {
      "Offset Min X": "-300",
      "Offset Min Y": "-100",
      "Offset Max X": "0",
      "Offset Max Y": "0"
    },
    "Left Button Text": "<size=36><</size>",
    "Left Button Color": "0.11 0.51 0.83",
    "Left Button Anchors": {
      "Anchor Min X": "0.025",
      "Anchor Min Y": "0.05",
      "Anchor Max X": "0.325",
      "Anchor Max Y": "0.95"
    },
    "Center Button Text": "<size=36>Page: {page}</size>",
    "Center Button Color": "0.11 0.51 0.83",
    "Center Button Anchors": {
      "Anchor Min X": "0.350",
      "Anchor Min Y": "0.05",
      "Anchor Max X": "0.650",
      "Anchor Max Y": "0.95"
    },
    "Right Button Text": "<size=36>></size>",
    "Right Button Color": "0.11 0.51 0.83",
    "Right Button Anchors": {
      "Anchor Min X": "0.675",
      "Anchor Min Y": "0.05",
      "Anchor Max X": "0.975",
      "Anchor Max Y": "0.95"
    }
  }
}​
Whenever i add a permission to the skin it reverts back to the old config, please tell me what im doing wrong! Thanks :)

What do you mean by "reverts"? What does it say in the console? Make sure you are making changes to the config while the plugin is unloaded.

"[Skins] Your configuration file contains an error. Using default configuration values." This is what i mean by reverting to the old config.

I have tried making changes to the config while the plugin is unloaded and it makes no difference, but as soon as i change the permission back to nothing it works again.

Same problem. Plugin failed on LoadConfig() function, when any "Skins" item has not an empty string in "Permission" parametr. How to fix that?

try-catch operator in LoadConfig() function returns this exception:

System.NullReferenceException: Object reference not set to an instance of an object
  at Oxide.Plugins.Skins+Configuration.IndexSkins () [0x00034] in <76e4da4602014036807f1078245be451>:0 
  at Oxide.Plugins.Skins.LoadConfig () [0x0002f] in <76e4da4602014036807f1078245be451>:0​


Merged post

I'd made some research.. You call an singleton _ins.permission.RegisterPermission() in _config.IndexSkins(), but i think in moment when LoadConfig() hook called there are not called Init() yet and _ins not setted to "this" context

Merged post

Yeah! I'd fixed this!

replace method call _config.IndexSkins() from LoadConfig() hook to Init() hook



Merged post

Works fine. I'd tested it. But now I have second Permission problem. If user's permissions changed, I need to reload plugin to have an correct skins list, if skins depends on permission. Is this a caching-like error? 

Author, did you even tested permissions feature in this plugn?!

Same here. 

Adding any permission in json file for a specific set of skins or items gives the following error :

[Skins] Your configuration file contains an error. Using default configuration values."

Default config is then loaded and no skins are available. 

Removing permission in json does fix it after  reloading the plugin.

 

Try putting the configuration file in jsonlint or such websites to validate it

Hello,

Jsonlint valides it.

Here's an example of what causes the issue : (Only the edited portion is shown, rest of the file is on default value)

{
      "Item Shortname": "box.wooden",
      "Permission": "admin",
      "Skins": [
        0,
        2922040340,
        2919127149,
        2668493256
      ]
    }

As soon we add a value to Permission, we have the error. if we leave it empty ( "" ) ,  it works. But in that case, it's impossible to allow a specific set of skins for default users and another set of skins for vips or admins. Unless of course, the permission has to be empty and must not be edited in any way but in that case, I wonder what its used for.