here are the errors
1. There are inconsistent line endings in the 'Assets/CScripts/movement.cs' script. Some are Mac OS X (UNIX) and some are Windows.
This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.
2. Assets/CScripts/movement.cs(21,2): error CS1520: Class, struct, or interface method must have a return type
3. Assets/CScripts/movement.cs(23,43): error CS1525: Unexpected symbol `;', expecting `)' or `,'
4. Assets/CScripts/movement.cs(26,8): error CS1525: Unexpected symbol `moveVel'
and here is my code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class movement : MonoBehaviour {
public float Speed = 10, jumpVelocity = 10;
Transform myTrans;
Rigidbody2D myBody;
bool isGround = false;
void Start ()
{
myBody = this.RigidBody2D;
myTrans = this.Transform;
}
fixedUpdate ()
{
move(Input.GetAxisRaw("Horizontal"));
}
Vector2 movevel = myBody.velocity
moveVel.x = horizontalInput* Speed;
public void move(float horizontalInput)
{
myBody.velocity = moveVel;
}
}
Please email me back on how to fix it at: Lime2004@icloud.com
↧