Search Unity

C# error cs8025 parsing error unity3d

Discussion in 'Scripting' started by SP-Designs, Oct 13, 2015.

  1. SP-Designs

    SP-Designs

    Joined:
    Oct 13, 2015
    Posts:
    184
    Hi there! I am making my first basic game but for some reason i am getting this error: Assets/Scripts/PlayerController.cs(1,19): error CS8025: Parsing error and i don't know what's wrong so please help me!

    CODE :
    Code (csharp):
    1.  using UnityEngine;using System.Collections;

public class PlayerController : MonoBehaviour {

  public float speed;

  private Rigidbody rb;

   // Use this for initialization
   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 * speed);
  }
}

    Add comment · Hide 1
     
    Last edited: Oct 15, 2015
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    Learn to use [code ]code tags[/code] instead of.....whatever that was. It looks like you pasted it onto a website, copied that, and pasted it here....
     
    Dantus and image28 like this.
  3. SP-Designs

    SP-Designs

    Joined:
    Oct 13, 2015
    Posts:
    184
    Thanks for the tip but i am looking for the problem in my code.I am not looking for advice in this thread!
     
  4. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    And it's virtually impossible for us to read your code as you've pasted it. Seriously, take a look at your first post, it's all on one line. If you put it in code tags and paste your code in there, not only will it be formatted readably, it will also have line numbers on it and we would know exactly where to look to find your problem.

    The suggestions on forum etiquette we give aren't arbitrary. They make your problems easier to solve. Help us help you. Meet us halfway.
     
    evanratt and Korno like this.
  5. SP-Designs

    SP-Designs

    Joined:
    Oct 13, 2015
    Posts:
    184
    can i edit my thread?
     
  6. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    Yes, there should be an edit button at the bottom of each comment you posted.