What’s wrong
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerHealth : MonoBehaviour {
public int maxHealth = 100;
public int curHealth = 100;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnGUI() {
GUI.Box (Rect (10, 10, Screen.width / 2 (maxHealth / curHealth), 20), curHealth + "/" + maxHealth);
}
}