- Home /
Question by
thankedtoaster · Nov 13, 2013 at 02:18 AM ·
error
Error expecting EOF found Function
Im new at this and need some help im getting an error expecting EOF found function.
var health = 3; var TakeDamage : boolean;
Function: OnTriggerEnter;(other : Collider) { if(other.tag == "player") { TakeDamage = true; } } Function: OnTriggerExit;(other : Collider) { if(other.tag == "player") { TakeDamage = false; } } Function: update() { if (TakeDamage) { if (Input.GetButtonDown("fire")) health --; } }
Comment
Format code when you post it. However I can see that you're inventing your own syntax, which won't work. Look at the code examples in the docs and write code like that.