Hello, I want to make a script for score, at each question answered right the player gets a point but I can’t figure how to make the script, so here it is:
using UnityEngine;
using System.Collections;
public class Final : MonoBehaviour {
public GUIStyle myStyle;
public int Score=0;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Application.ExternalCall("RightQ1"))
Score+= 1;
}
void OnGUI(){
if(Score > 0)
GUI.Box(new Rect(0,0,Screen.width,Screen.height)," ",myStyle);
}
void Awake(){
DontDestroyOnLoad(transform.gameObject);
}
}
And I get this error: Assets/Scripts/Final.cs(16,17): error CS0029: Cannot implicitly convert type void' to
bool’
What am I doing wrong?