Hi! I was wondering if I could get some help with console commands. I do not believe there is currently a console command for zone wipe, so I attempted to create my own to no avail. Here is a snippet of what I came up with:

        [ConsoleCommand("zonewipe")]
        private void ccmdZonewipe(ConsoleSystem.Arg arg)
        {
            if (!HasPermission(arg, PERMISSION_ZONE))
            {
                SendReply(arg, "You don't have access to this command");
                return;
            }

            storedData.definitions.Clear();
            SaveData();
            Unload();
            SendReply(arg, "Wiped zone data");
        }
​
For reference, I inserted this into line 2929 of the ZoneManager.cs file. Also, the first line is indented to the same level as private void, it just appears not to be in my post.

I have very little coding experience, but I'm not sure why this is not working. When I execute the zonewipe console command the "Wiped zone data" line prints into my console, and if I check /zone_list in game chat it appears empty as if it worked - unfortunately as soon as I reload the plugin the /zone_list repopulates. This issue is not present when using the /zone_wipe chat command.

As a side note, I also can only execute this console command once, then it "stops working" - a.k.a. the only part that seems to be working (printing "Wiped zone data" in console) won't work more than once unless I reload the plugin.

I directly copy/pasted this console command from the chat command /zone_wipe with edits copying one of the console commands. I'm hoping I am going down the right path, but perhaps I bit off more than I could chew and it is much more advanced than just "copy pasting" to make it work.