Attempting to change to different version of object...?

Alright, hi there; I’ve been working on a script for an ashtray in a sort of ‘use object->thing happens to the ashtray’ type situation. I’ve got four different GameObjects for the ashtray, one of each version: Ashtray with crumbled paper, ashtray with ashes, ashtray with key, and plain old ashtray. It is supposed to change when I press the ‘e’ key. I don’t need a cycle; once it’s hit all of them, it needs to stay at ‘plain old ashtray’.
My problem is thus:
Something in the c# code is not working, and unity keeps telling me this:
[30138-screen+shot+2014-07-31+at+5.52.35+pm.png|30138]

Here’s the full code I’ve got so far:

using UnityEngine;
using System.Collections;

public class AshtrayControlleyThing : MonoBehaviour {

	GameObject object1 = Obj("Ashtray-Paper Model");
	GameObject object2 = Object("1Ashes Model");
	GameObject object3 = Object("2Key Model");
	GameObject object4 = Object("3Empty Model");


	//[RequireComponent (typeof (GameObject ("Open Lighter")))];
	/*[RequireComponent (typeof(BoxCollider))]
receive Input*/
	void Update(){
				if (Input.GetKey ("e")) {
						if (object3) {
								Instantiate (object4, object3.transform.position, object3.transform.rotation);
								Destroy (object3);
						}
						if ( object2) {
								Instantiate (object3, object2.transform.position, object2.transform.rotation);
								Destroy (object2);
						}
						if ( object1) {
								Instantiate (object2, object1.transform.position, object1.transform.rotation);
								//remove object1
								Destroy (object1);
						}

				}
		}
/*function onKey ("e")(){
[RequireComponent (typeof (GameObject ("Open Lighter")))];
		Instantiate(object2,object1.transform.position,object1.transform.rotation);
		//remove object1
		Destroy(object1);
		
		if (object1=Destroy){
[RequireComponent (typeof (GameObject ("Brush")))];
		Instantiate(object3,object2.transform.position,object2.transform.rotation);
			//remove object2
			Destroy(object2);}
		
		if (object2=Destroy)(object1=Destroy){
		Instantiate(object4,object3.transform.position,object3.transform.rotation);
			//remove object3
			Destroy(object3);}

	}*/
}

(The stuff in comments I decided to not pay attention to in the meantime; mostly so I could get the main code working (the switchy part), but if you have any idea how to do this, I need to use a lighter from my inventory to make the ashtray go from crumbled paper ver. to ashes ver., then a brush to go from ashes ver. to key ver., and then pick up the key; but I think that’s a whole new script.)

Thank you!

The surface issue is that there is no ‘new’ keyword in front of each of your Object() calls, and the compiler is finding a ‘type’ (Object) where it does not expect. But even if you add ‘new’, the code still has problems. Assuming what you are trying to do is find objects of the name you are passing as a string, then you could do:

GameObject object1;
GameObject object2;
GameObject object3;
GameObject object4;

void Start() {
    object1 = GameObject.Find("Ashtray-Paper Model");
    object2 = GameObject.Find("1Ashes Model");
    object3 = GameObject.Find("2Key Model");
    object4 = GameObject.Find("3Empty Model");
}

Or alternately if the game objects exist at edit time, you can make them public and then use drag and drop in the inspector to initialize them. So there would be no initialization code and the top of the file would just have:

public GameObject object1;
public GameObject object2;
public GameObject object3;
public GameObject object4;