Adding #pragma script to a script actually causes an error in another script. Here is the code
for(var gameObj : GameObject in GameObject.FindObjectsOfType(GameObject)){
if(gameObj.name == "Curved Wall") gameObj.SendMessage("Send");
if(gameObj.name == "Straight Wall") gameObj.SendMessage("Send");
}
The error message is - Cannot convert 'UnityEngine.Object' to 'UnityEngine.GameObject'. This code works great without the pragma strict which I needed because I read that I need it for mobile devices which I will port this project to later.