var projecile : Rigidbody;
var speed = 20;
function Update()
{ if (Input.GetButtonDown(“Firel”)); there is an error
{ var instantiatedProjectile : Rigidbody = Instantiated( projectile, transform.position, transform.rotation);
instantiatedProjectile.velocity = transform.TransformDirection(Vector3 ( 0, 0, speed));
Physics.IgnoreCollision( instantiatedProjectile.collider, transform.root.collider); } }
Delete and retype the line in and the problem will go away. If you view this code with a word processor (with formatting symbols turned on), or with a hex dump program, you will see the offending character just in front of the ‘;’.