A namespace can only contain types and namespace declarations.

So i have a problem with this very easy script. This script is smacked to 3D Object, which has Box Collider and TRIGGER enabled. So it should send function “OpenQualitySettingsMenu”.
Instead, i get these wild errors everywhere. There was Parsin errors, A namespace can only contain types and namespace declarations errors, at line 2,28, and i just cant figure out whats wrong.
Parsing error was at line 3,1. Im very new to C# Script, and only used JavaScript so far. But as it turns out Javascript cannot send Functions, and i had to use C#.

Heres my script.

using UnityEngine;
public QualitySettingsMenu OpenSettings; 
{
function OnMouseDown(){
{
	OpenSettings.OpenQualitySettingsMenu();
     }
}

This script happens to be VERY important to my game, as it opens Quality Settings menu where one can tweak settings, as launcher is disabled.

Count your curly brackets. You have 3 left curly brackets and 2 right ones.

Aslo you have declared your functions and variables withou declaring a class. All of your text after using UnityEngine should be inside a class block

using UnityEngine;
public class MyClass 
{
   public QualitySettingsMenu OpenSettings; 
   void OnMouseDown()
   {
       OpenSettings.OpenQualitySettingsMenu();
   }
}

All this is assuming you meant to write C#. The ‘function’ keyword and the fact that you didn’t declare a class suggests that you might be mixing up c# and UnityScript