Parser Error (set a spawn after hit tables)

using UnityEngine;
using System.Collections;

var Spawn : Transform;

public class respawn : MonoBehaviour {

	 public GameObject Spawn;
	
	void OnTriggerEnter(Collider other)
	{
		if (other.tag == "Player") 
	{
			other.transform.position = Spawn.transform.position;
			Debug.Log("moved");
		}
	}

}

Im currently using unity4, it suppose to spawn in front of tables after i hit em, but it nothing happen.

in future please format ALL of your code - that way the line number info from error messages (which you haven’t posted) will show where the error is.

in this case, it’s because you’re trying to mix unityscript with c# - never a good idea.

move the declaration of Spawn into the class.