gui.box not showing need some help

Hello there i made an hp bar in unity 3d with gui.box But after i wrote the code and fixed all errors, i cant get it to show in the game can anyone please assist me with that.

here is the code :

using UnityEngine;
using System.Collections;

public class PlayerHealth : MonoBehaviour {
public int maxHealth = 100;
public int curHealth = 100;

public float healthBarLenght;

// Use this for initialization
void Start () {
healthBarLenght = Screen.width / 2;

}

// Update is called once per frame
void Update () {
AddJustCurrentHealth (0);

}

void onGUI() {
GUI.Box(new Rect(10, 10, healthBarLenght, 20), curHealth + “/” + maxHealth);

}

public void AddJustCurrentHealth(int adj){
curHealth += adj;

if (curHealth < 0)
curHealth = 0;

if (curHealth > maxHealth)
curHealth = maxHealth;

if (maxHealth < 1)
maxHealth = 1;

healthBarLenght = (Screen.width/2) * (curHealth / (float)maxHealth);

}

}

thx for all the help i can get here!

I would rename your GUI method from “onGUI” to “OnGUI” and see if that gets you there, also of course that the script it attached to an object in the scene, but try the case change on the method.

As a note, please format your code with code tags, an explanation can be found here.

oh thanks alot! dident even think of that even tho i read it true like 100 times, and for the code tags i will do that if i post again, thx again!