I ran across a scripting error to do with nested brackets, but I really can’t find the problem. Does anyone know whats going on? The error is apparently at 16,16
#pragma strict
var plasterWall : GameObject;
var wallObjectTag : String = "Wall";
function OnMouseDown () {
Debug.Log("Tile clicked");
if (gameObject.tag == "placement_plane_open"){
Instantiate(plasterWall, gameObject.transform.position, gameObject.transform.rotation);
gameObject.tag="placement_plane_closed";
}
}
function OnMouseOver () {
if(Input.GetMouseButtonDown(1)){
if OnCollisionEnter (Collision col){
if (col.gameObject.tag == "Wall") {
Destroy(col.gameObject);
}
}
}
}