Error In Unity5 Code

Asked

Viewed 30 times

-2

inserir a descrição da imagem aqui I have two mistakes , I’m not able to fix

inserir a descrição da imagem aqui

  • Hello again, Leandro, hello. I’ll give you some tips to help you more easily in the future, and also to improve your programming skills. The first mistake is exactly the same of your other question. There are two answers, you accepted one (probably from the person who most helped you in comments), but the other answer is more complete. If you had analyzed it, you would see that the body of the method needs to be fully stated. The answer is there, you just didn’t pay attention.

  • I just did not vote to close this question as duplicate because it also another error/problem to follow. This second error is probably also lack of attention (maybe you are following a tutorial? ). Also, you will notice that this your question received negative votes. The reason is because it is poorly done. In the future, try to place the code snippets and error text instead of screen images in these cases. And, another tip for the future: read the error messages. I know they are in English (use the Google translator! ), but they exist precisely to explain the reason for the error. : ) [s]

  • 1

    Thanks Luiz . I will improve

1 answer

1


Method void Animating (float h, float v) should be declared so

void Animating  (float h, float v){

}

The second mistake is the fact that probably floorHit is not a Vector3.

If you want to decrease some possibility of Transform and assign in variable playerToMouse , will have to use this way:

Vector3 playerToMouse = new Vector3(transform.position.x, transform.position.y,transform.position.z); and decrease the possibility you want by floorHit.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.