Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

The name does not exist in the current context...

Discussion in 'Scripting' started by NobiliumBlue, Oct 9, 2014.

  1. NobiliumBlue

    NobiliumBlue

    Joined:
    Oct 9, 2014
    Posts:
    2
    Okay, I know this is a problem that people have responded to already, but I typed this in, character for character, from the Roll a Ball tutorial:


    using UnityEngine;
    using System.Collections;

    public class BallRoll : MonoBehaviour {



    // FixedUpdate is called before making physics calculations.
    void FixedUpdate () {

    float moveHorizontal = Input.GetAxis("Horizontal");
    float moveVertcal = Input.GetAxis("Vertical");

    Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);

    rigidbody.AddForce(Vector3);
    }
    }

    Aaaand "moveVertical" does not exist in the current context. moveHorizontal's apparently fine. Wat.
     
    jatprogrammer likes this.
  2. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    moveVertcal isn't the same as moveVertical
     
    jatprogrammer likes this.
  3. NobiliumBlue

    NobiliumBlue

    Joined:
    Oct 9, 2014
    Posts:
    2
    Wow. I'm going to slam my face repeatedly into my desk now. Thanks.
     
    jatprogrammer likes this.