Witam!
Zacząłem oglądać tutoriale Brackey'sa. Po obejrzeniu tego odcinka nie działa mi skrypt. Ktoś ma pomysły dlaczego?
#pragma strict var TheDammage : int 50; var Distance : float; function Update() { if (Input.GetButtonDown("Fire1")) { var hit : RaycastHit; if(Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), hit)) { Distance = hit.distance; hit.transform.SendMessage("ApplyDammage", TheDammage,SendMessageOptions.DontRequireReceiver); } } }
Błędy są następujące
Assets/MeleeSystem.js(3,21): UCE0001: ';' expected. Insert a semicolon at the end.
There are inconsistent line endings in the 'Assets/MeleeSystem.js' script. Some are Mac OS X (UNIX) and some are Windows.
This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.