I am JUST starting unity and am working out of the beginning 3D game development with unity 4 book and I am having a problem with scripting. I am in chapter 5 and entering scripts as they are in the book and getting errors as a result the script is
var sendToObject : GameObject;
var correctObject: GameObject; //this si the only object we allow to trigger the event
function OnTriggerEnter (object : Collider)
{
OnTriggerExit
// call the function on the specified object
print (object.name;//this is the name of the object triggered the event
sendToObject.SendMessage("ToggleTrigger");
}
it says to add
print (object.name;//this is the name of the object triggered the event
inside both OnTrigger functions but i dont know where to put it
getting errors:
Error UCE0001: ‘;’ expected. Insert a semicolon at the end. (UCE0001) (Assembly-UnityScript)
Error BCE0044: expecting ), found ‘;’. (BCE0044) (Assembly-UnityScript)
Error UCE0001: ‘;’ expected. Insert a semicolon at the end. (UCE0001) (Assembly-UnityScript)
I really suck at scripting so i’m sure it’s probably something really simple but I have no idea what to do, any help would be greatly appreciated