I'm new to creating Rust plugins, I decided to make a plugin and I get an error that I don't know how to fix
using System;
using System.Collections.Generic;
using System.Text;

using Oxide.Core;
using Oxide.Core.Libraries.Covalence;

namespace Oxide.Plugins
{
	[Info("OwnOPlugin", "ShadVert", "0.0.1")]
	[Description("Test Plugin")]
	
	class OwnOPlugin : RustPlugin
	{	
	    string PermissionDayU = "dayu.use"
	    
        #region Commands
        
        [ChatCommand("test")]
        private void CmdTest(BasePlayer player, string command, string[] args)
        {
            player.ChatMessage("Test");
        }
        
        [ChatCommand("day1")]
        private void CmdDay1(BasePlayer player, string command, string[] args)
        {
            if(!permission.UserHasPermission(player.UserIDString, PermissionDayU) && !player.IsAdmin)
            {
                player.ChatMessage("No perms");
                return;
            }
            else
            {
                player.ChatMessage("...")
            }
        }
        
        #endregion
    }
}

OwnOPlugin.cs(38,13): error CS1002: ; expected

Here is the error ^
How to fix it?

You're missing semicolons ; at the end of each line where the error is indicated.

AcpGxquI71dGTY8.png Dana

You're missing semicolons ; at the end of each line where the error is indicated.

 OwnOPlugin.cs(39,10): error CS1519: Unexpected symbol `;' in class, struct, or interface member declaration

I tested ChatGPT, just posted the code in with no context and it fixed the errors for you.

 

using System;
using System.Collections.Generic;
using System.Text;

using Oxide.Core;
using Oxide.Core.Libraries.Covalence;

namespace Oxide.Plugins
{
    [Info("OwnOPlugin", "ShadVert", "0.0.1")]
    [Description("Test Plugin")]

    class OwnOPlugin : RustPlugin
    {
        string PermissionDayU = "dayu.use";

        #region Commands

        [ChatCommand("test")]
        private void CmdTest(BasePlayer player, string command, string[] args)
        {
            player.ChatMessage("Test");
        }

        [ChatCommand("day1")]
        private void CmdDay1(BasePlayer player, string command, string[] args)
        {
            if(!permission.UserHasPermission(player.UserIDString, PermissionDayU) && !player.IsAdmin)
            {
                player.ChatMessage("No perms");
                return;
            }
            else
            {
                player.ChatMessage("...");
            }
        }

        #endregion
    }
}