I have been using:
[http://www.instructables.com/id/How-to-make-a-simple-game-in-Unity-3D/?ALLSTEPS][1]
to make a unity game and I have come across this error:
Assets/Scripts/Character_Controller.cs(38,32): error CS1525: Unexpected symbol (', expecting
)‘, ,',
;’, [', or
=’
In the Void CountText () { section
Unfortunately I have no clue what I have done/left out to cause this, some help is requested. if anything else is seen I would also appreciate it if you told me aswel Here is the script:
using UnityEngine;
using System.Collections;
public class Character_Controller : MonoBehaviour {
public float speed;
void FixedUpdate () {
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
GetComponent<Rigidbody>().AddForce (movement * speed * Time.deltaTime);
}
private int count;
public GUIText countText;
void Start () {
count = 0;
CountText();
}
void OnTriggerEnter (Collider other) {
if(other.gameObject.tag=="item"){
other.gameObject.SetActive(false);
count = count + 1;
CountText();
}
if(other.gameObject.tag=="hazard"){
other.gameObject.SetActive(false);
Vector3 jump = new Vector3(0.0f, 30, 0.0f);
rigidbody.AddForce (jump * speed * Time.deltaTime);
}
Void CountText () {
countText.text = "Count: " + count.ToString();
}
}
I thank you for the help