using System.Collections;
using System.Collections.Generic;
using UnityEngine;
{
private float speed = 2.0f;
public GameObject character;
void Update (player) {
if (Input.GetKey(KeyCode.RightArrow)){
transform.position += Vector3.right (2.0); Time.deltaTime;
}
if (Input.GetKey(KeyCode.LeftArrow)){
transform.position += Vector3.left (2.0); Time.deltaTime;
}
}
Please don’t just share the error code. Nobody memorizes error codes. Please share the full error message, including the description and the numbers at the end. Those numbers tell you exactly where you have errors in your code.
Remove the extraneous word “player” from your update method parameter list:
void Update (player) {
should be void Update () {
You also have weird lines like this with punctuation all over the place:
Vector3.right (2.0); Time.deltaTime;
I’m guessing you meant to multiply all these things together? Like this:
Vector3.right * 2.0f * Time.deltaTime;