I was programing in unity and i got a error. i COULDNT find it, please help.
The bug: Assets\Scripts\Movement\Assembly-CSharp.cs(30,13): error CS1002: ; expected
Another bug: Assets\Scripts\Movement\Assembly-CSharp.cs(30,13): error CS1513: } expected
The script;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
public float sensX;
public float sensY;
public Transform orientation;
float xRotation;
float yRotation;
private void start()
{
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
private void Update()
{
// get mouse input
float mouseX = Input.GetAxisRaw(“Mouse X”) * Time.deltaTime * sensX;
float mouseY = Input.GetAxisRaw(“Mouse Y”) * Time.deltaTime * sensY;
yRotation += mouseX;
xRotation -= mouseY;
xRotation ) Mathf.Clamp(xRotation, -90f, 90f);
// rotate cam and orientation
transform.rotation = Quaternion.Euler(xRotation, yRotation, 0);
orientation.rotation = Quaternion.Euler(0, yRotation, 0);
}
}
Please use code-tags and not plain text when posting code. Also note, you can EDIT your posts.
I don’t get why you cannot find the error or follow what it’s saying. It tells you what the problem is and on what line (30) and column (13) so what specifically don’t you understand about that?
Look at line 30. Does that line look like valid C# to you?
This is not a BUG. It’s a typo.
Thank you.
You fixed it
Again, you deleted your message above but you can EDIT your posts.