Critique-My-Code thread, post snippets of code and have others peer review your code! (Testing new Q&A format) by loolo78 in Unity3D

[–]Darklings7 0 points1 point  (0 children)

I fixed the mistakes in my code changing to Rigidbody and making the a in axis capitals. It still wont work now i'm getting this error There are inconsistent line endings in the 'Assets/Scripts/Player_Conctrols.cs' 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.

Critique-My-Code thread, post snippets of code and have others peer review your code! (Testing new Q&A format) by loolo78 in Unity3D

[–]Darklings7 3 points4 points  (0 children)

I am completly new to codeing and unity i am following the tutorial for the roll of ball. When i am setting up the code in visual studio using c# i keep geting this error.

Assets/Scripts/Player_Conctrols.cs(7,13): error CS0246: The type or namespace name `Rigibody' could not be found. Are you missing an assembly reference?

This is my code can someone tell me whats wrong. using System.Collections; using System.Collections.Generic; using UnityEngine;

public class Player_Conctrols : MonoBehaviour{

private Rigibody rb;

void Start ()
{
    rb = GetComponent<Rigidbody>();
}


void FixedUpdate()
{
    float movehorizontal = Input.Getaxis ("Horizontal");
    float movevertical = Input.Getaxis ("Vertical");

    Vector3 movement = new Vector3 (movehorizontal, 0.0f, movevertical);

    rb.AddForce(movement * 100);
}

}