Im getting an error that says: Assets/Scripts/Player.cs(29,9): error CS8025: Parsing error and i dotn know whats causing it so please help me.
My code:
using UnityEngine;
using System.Collections;
public class Player : MonoBehaviour {
public float velociadade ;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Movimentar();
}
void Movimentar()
{
if (Input.GetAxisRaw ("Horizontal") > 0) {
transform.Translate (Vector2.right * velociadade * Time.deltaTime);
}
if (Input.GetAxisRaw ("Horizontal") < 0) {
transform.Translate (-Vector2.right * velociadade * Time.deltaTime);
}
i have the same error in this sentences please i need to know what's the probleme here .this is where's the probleme appear : **void carry (GameObject o){ o.rigidbody.iskinematic=true ; o.transform.position=mainCamera.transform.postion+mainCamera.transform.forward*distance ; }
In running through the tutorial I noticed after a crash that if you copy and paste in code and there are more command line numbers you will get this error even if the brackets around functions are correct. try deleting excess lines from script, until just before the terminating bracket it will go away.
Hi, I had a similar problem and I was able to fix it in the following manner:
First I checked my curly braces as many of these users have needed to do, but my code was fine. Further more, I knew my code was fine because it had worked before, but my Library folder had been nuked so I had to copy-paste a bit.
So another thing to check here is the fact that VS and Mono don’t play the same game with regards to line endings. MonoDevelop uses the same one all the time and VS does whatever it feels like at the time. So for each file that I was getting the CS8025 error, I opened it in VS and went to File->Advanced Save Options and changed “Line endings” to be Windows (CR LF). I’m on windows 10, ymmv.
@RadamSTGamer - if you haven't picked an answer yet for this question, consider picking one, as this issue seems to to need it.
i have the same error in this sentences please i need to know what's the probleme here .this is where's the probleme appear : **void carry (GameObject o){ o.rigidbody.iskinematic=true ; o.transform.position=mainCamera.transform.postion+mainCamera.transform.forward*distance ; }
– hight_FiveWTF ?! [57816-sem-titulo.jpg|57816]
– KrugSckpouch