Error while compiling, Unexpected symbol `}'Solved
I understand that the error message below is saying that there is an unexpected "}" but VS did not pick up on this and I am wondering why.
I am also wondering what line of code to start looking on because my code ends at line 109.

Error while compiling: newwhere.cs(111,4): error CS1525: Unexpected symbol `}'

Thanks!
Sounds like you may not have saved the file in VS before copying the plugin. The error means what it says, that you are missing either a closing brace or other closing symbol somewhere in the code. You should see red where the issue is in VS, but make sure it is saved before copying as well.
Thanks, WIll do so.

Merged post

Is the compiler saying that the error is on line 35?
If so my code ends at 32.
Error while compiling: newwhere.cs(35,4): error CS1525: Unexpected symbol `}'

I removed all of the extra comment crap to condense.

I really cant find the error and would appreciate another set of eyes.

using Oxide.Core.Libraries.Covalence;
using Oxide.Game.Rust.Libraries;

namespace Oxide.Plugins
{
    [Info("New Where", "PEBKAC Error", "1.0")]
    [Description("Same as whereami except that Covalence / IPlayer is used")]

    public class newwhere : CovalencePlugin
    {
     
        [Command("where")]
        
        private void WhereCommand(IPlayer player, string command, string[] args)
        {
            int _State = 1;
            System.Timers.Timer stateCheckTimer = new System.Timers.Timer();
            stateCheckTimer.Interval = 1000; // TODO - set to desired interval (in ms)
            stateCheckTimer.AutoReset = true;
            stateCheckTimer.Elapsed += stateCheckTimer_Elapsed;

            void stateCheckTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
            {
                if (_State == 1)
                {
                    Puts("if statement");
                }
            }

        }
    }
}​
you are missing it here you would alsoneed to move
 int _State​
outside the commands

using Oxide.Core.Libraries.Covalence;
using Oxide.Game.Rust.Libraries;

namespace Oxide.Plugins
{
    [Info("New Where", "PEBKAC Error", "1.0")]
    [Description("Same as whereami except that Covalence / IPlayer is used")]

    public class newwhere : CovalencePlugin
    {

        int _State = 0;
        [Command("where")]

        private void WhereCommand(IPlayer player, string command, string[] args)
        {
            _State = 1;
            System.Timers.Timer stateCheckTimer = new System.Timers.Timer();
            stateCheckTimer.Interval = 1000; // TODO - set to desired interval (in ms)
            stateCheckTimer.AutoReset = true;
            stateCheckTimer.Elapsed += stateCheckTimer_Elapsed;
/////HERE      }



            void stateCheckTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
            {
                if (_State == 1)
                {
                    Puts("if statement");
                }
            }


///REMOvE
    }
}​

Also make sure ya read note above by Wulf

Thanks all!
Locked automatically