I've created a new skill that gives you permission to put a codelock on horses; the code I added is this:
{
"Enabled": true,
"Skill ID": 59,
"Skill Type": "PermissionGrant",
"Title": "Bloqueo Caballos",
"Description": "Posibilidad de bloquear tu caballo mediante un codelock, recuerda estar en permisos de armario y los componentes o un codelock para poder crear el bloqueo",
"Image": "https://gitlab.com/TheMevent/PluginsStorage/raw/main/Images/Skills/Icons/Teleportation.png",
"Permission": "",
"Requirements to access skill": [],
"Permission Grant Settings": {
"Levels (each level grants its permission)": [
{
"Permission To Grant Player": "vehicledeployedlocks.codelock.ridablehorse",
"Group To Grant Player": "",
"Value": 0.0,
"Cost": 300.0,
"Permission": "",
"Requirements to access level": []
}
]
}
}
The permission is granted correctly, but when you try to remove that skill, it gives this error in the console and the plugin stops working.
Failed executing chat command 'skill' in 'Skills v2.1.4 by Mevent' [callback] (Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index)
at PermissionGrantLevelEntry System.Collections.Generic.List<Oxide.Plugins.Skills+PermissionGrantLevelEntry>.get_Item(int index)
at bool Oxide.Plugins.Skills.HasSkillsPlayerPermission(string playerId, string permission) in /home/6e2a8c12-5d52-4798/gameserver/gameserver/carbon/plugins/Skills.cs:line 11357
at bool Oxide.Plugins.Skills+PermissionUserHasPermissionPatch.Prefix(ref bool __result, string id, string perm) in /home/6e2a8c12-5d52-4798/gameserver/gameserver/carbon/plugins/Skills.cs:line 11329
at bool Oxide.Plugins.SkillsExtensionMethods.ExtensionMethods.HasPermission(string userID, string b) in /home/6e2a8c12-5d52-4798/gameserver/gameserver/carbon/plugins/Skills.cs:line 21620
at bool Oxide.Plugins.SkillsExtensionMethods.ExtensionMethods.HasPermission(BasePlayer a, string b) in /home/6e2a8c12-5d52-4798/gameserver/gameserver/carbon/plugins/Skills.cs:line 21625
at void Oxide.Plugins.Skills.CmdOpenSkills(IPlayer cov, string command, string[] args) in /home/6e2a8c12-5d52-4798/gameserver/gameserver/carbon/plugins/Skills.cs:line 11579
at object System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
Can you tell me how to fix it?