Error CS8025: Parsing Error
Hi! I need help :( How to I fix the error Error CS8025: Parsing Error on both of my C# Scripts:
1:
using UnityEngine; using System.Collections;
[RequireComponent (typeof Rigidbody))]
public class PlayerControl : MonoBehaviour {
Vector3 velocity;
Rigidbody myRigidbody;
void Start () {
myRigidbody = GetComponet<Rigidbody> ();
}
public void Move(Vector3_velocity) {
}
public void FixedUpdate() }
myRigidbody.MovePosition (myRigidbody.position = velocity * Time.fixedDeltaTime);
}
}
2:
using UnityEngine; using System.Collections;
[RequirComponet (typeof) (PlayerController))] public class Player : MonoBehaviour {
public float moveSpeed = 5;
PlayerController controller;
void Start () {
controller = GetComponent<PlayerController> ();
}
void Update () {
Vector3 moveImput = new Vector3(Imput.GetAxis("Horizontal"),0,Imput GetAxis("Vertical"));
Vector3 moveVelocity = moveImput.normalized * moveSpeed;
controller.Move(moveVelocity);
}
}
Answer by itsharshdeep · Oct 06, 2015 at 04:38 AM
In Your First Script "PlayerControl"
you placed FixedUpdate Brace on wrong side
form
public void FixedUpdate() }
to
public void FixedUpdate() {
Thanks Harsh
Answer by SaiKumarchinna · Sep 14, 2016 at 12:32 PM
public float Speed = 6f;
Vector3 movement;
Animator anim;
Rigidbody playerRigidbody;
int floorMask;
float camRayLength = 100f;
} } void Awake () { floorMask = Layermask.GetMask ("Floor"); anim = GetComponent (); PlayerRigidBody = GetComponent (); }
void FixedUpdate ()
{
float h = Input.GetAxisRaw ("Horizontal");
float v = Input.GetAxisRaw ("Vertical");
Move (h, v);
Trning ();
Animating (h, v);
Answer by SaiKumarchinna · Sep 14, 2016 at 06:07 AM
public float Speed = 6f;
Vector3 movement;
Animator anim;
Rigidbody playerRigidbody;
int floorMask;
float camRayLength = 100f;
} } void Awake () { floorMask = Layermask.GetMask ("Floor"); anim = GetComponent (); PlayerRigidBody = GetComponent (); }
void FixedUpdate ()
{
float h = Input.GetAxisRaw ("Horizontal");
float v = Input.GetAxisRaw ("Vertical");
Move (h, v);
Trning ();
Animating (h, v);
Your answer
Follow this Question
Related Questions
ignore this 1 Answer
Unknown error 0 Answers
Only assignment, call, increment, decrement, and new object expressions can be used as a statement 0 Answers
Mac build crashes on fullscreen 0 Answers