- Home /
Question by
mihai12324 · May 20, 2021 at 02:49 PM ·
scripting problem
i have two errors ; expected,i got two errr
That is my code using System.Collections; using System.Collections.Generic; using UnityEngine;
public class playermovement : MonoBehaviour {
public CharacterContoller controller;
public float speed =12f;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
float x = Input.GetAxis("Horizontal");
float z = Input.GetAxis("Vertical");
Vector3 move = transform right * x + transform.forward * z;
controller.Move(move * speed * Time.deltaTime);
}
}
,
2021-05-20.png
(169.3 kB)
Comment
Answer by TheLastFireHawk · May 20, 2021 at 02:56 PM
I think you forgot the ; in the code something in 21 is wrong or typed wrong.
Your answer

Follow this Question
Related Questions
Integer value being constantly reset to original value after subtraction 2 Answers
UnityWebRequest - login page returns a "not found" 0 Answers
Access object script from prefab script 1 Answer
UNET error when retrieving matches 0 Answers
I can only select a prefab as my GameObject in the editor. 1 Answer