Problem with Bullets on GUI

so i have a file: MachineGun.js with a “static var bulletsLeft : int = 0;” and another file Bullets.js with this code attached to my Main Camera:

var i : int = MachineGun.bulletsLeft; var s : String = i.ToString(); function OnGUI () {
    GUI.Label (Rect (10, 10, 100, 20), s); }

And i want that this String s gets shown on my GUI, but it doesnt show. It works with normal Strings like String s = “blabla” but not with this code.


Have you tried adding Debug.Log(s) somewhere? see if it prints anything out.