Quantcast
Channel: Forum Pasja Informatyki - Najnowsze pytania
Viewing all articles
Browse latest Browse all 65225

Kod JS, unity

$
0
0

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.

 


Viewing all articles
Browse latest Browse all 65225

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>