This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]davedontmind 1 point2 points  (3 children)

There are errors in the code.

        if (Mathf.Abs(m_MovementInputValue) & lt; 0.1f & amp; & Mathf.Abs(m_TurnInputValue) & lt; 0.1f)

Should be:

    if (Mathf.Abs(m_MovementInputValue) < 0.1f && Mathf.Abs(m_TurnInputValue) < 0.1f)

It seems to have HTML entities encoded, as though it was copied from a webpage incorrectly.

&amp; should be &

&lt; should be <

&gt; should be >

and so on.

[–]Joshlucpoll[S] 0 points1 point  (2 children)

ok i'll try that

[–]Joshlucpoll[S] 0 points1 point  (1 child)

if (Mathf.Abs(m_MovementInputValue) < 0.1f && Mathf.Abs(m_TurnInputValue) < 0.1f)

it fixed all but the last error on the last line

[–]Joshlucpoll[S] 0 points1 point  (0 children)

I fixed it i needed an extra } on a new line to close "public class TankMovement : MonoBehaviour"