- Home /
BCE0044 unexpected char : 'h'.
hello. from a few hours I do not know what to do Here is part of my script
FixedUpdate function () {
h = Input.GetAxis ("Mouse X ') = hSpeed;
transform.Rotate = 0.h.0;
animator.SetFloat ('Speed', v);
animator.SetFloat ('Direction', h);
please format and give the error line. my guess would be the error is in "transform.Rotate = 0.h.0" and the line above it " h = Input.getaxis ("mouse X") = hSpeed" None of this looks correct,
I don't believe this is a serious question. That looks like you took a script and just messed up random parts in every line.
Just as precaution: -1
I have this script out of here. This is a Polish video because I'm Pole https://www.youtube.com/watch?v=Rm02Qp6-ykE
Answer by SkaredCreations · Mar 23, 2014 at 05:54 PM
You inverted the function declaration, it must be:
function FixedUpdate () {
And not the other way. This is the reason of the exception raised, then there is also the error notified by Destran: transform.Rotate is a function not a variable, and anyway the value you put there is not even a value, and other errors as well.
Here is how it should have been:
function FixedUpdate () {
var h : float = Input.GetAxis("Mouse X");
transform.Rotate(0, h, 0);
animator.SetFloat ("Speed", v);
animator.SetFloat ("Direction", h);
}
You shouldn't copy and paste random piece of code from an example to another without understanding what it does.
so it works but I have another problem A meta data file (. $$anonymous$$eth) exists but its asset 'Assets / Scripts / $$anonymous$$ovement.js' can not be found. When moving or deleting files outside of Unity, please ensure code That the Corresponding. $$anonymous$$eta file is moved or deleted along with it.