Use of unassigned local variable `Origin'

I am making a click and drag camera movement script and have run into a road block. i feel that i do not know enough about what i am doing with the local variables to figure this out on my won.

My error: error CS0165: Use of unassigned local variable `Origin’
it is telling me that my last Line 22 is using Origin, witch is not assigned, but four lines above it, i clearly define it with Line 17.

void ClickDrag(){
        print("Click");
        Ray ray;
        RaycastHit hit;
        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        if (Physics.Raycast(ray, out hit, 100.0f))
        {
            print("Ray hit");
            if (hit.collider.tag != "Flag"){
                Vector3 ResetCamera;
                Vector3 Origin;
                Vector3 Diference;
                bool Drag=false;
                Diference=(Camera.main.ScreenToWorldPoint (Input.mousePosition))- Camera.main.transform.position;
                if (Drag==false){
                    Drag=true;
                    Origin=Camera.main.ScreenToWorldPoint (Input.mousePosition);
                } else {
                    Drag=false;
                }
                if (Drag==true){
                    Camera.main.transform.position = Origin-Diference;
                }
            }      
        }
    }

what do change to make this work?

You only define it within that if statement. The way you have your statements set up the compiler can’t guarantee that it is assigned where you use it. Either assign a default value to Origin, or just do the screen transform when you declare it.

you did define it, but did not assign it in every possible way your code can run (in else branch you do not assign it).
You need to initialise your variable to use it.

or whatever your Vector should have as default value.

Thank you guys, that helped out.