02 Null References Exception Problems

02 Different GUIs.

First one:(sometime appears and sometimes no)

NullReferenceException: Object reference not set to an instance of an object
Boo.Lang.Runtime.RuntimeServices.CheckNumericPromotion (IConvertible convertible)
Boo.Lang.Runtime.RuntimeServices.CheckNumericPromotion (System.Object value)
Boo.Lang.Runtime.RuntimeServices.UnboxSingle (System.Object value)
sub.OnGUI () (at Assets/various/scripts/sub.js:72)

Reference code:

GUI.Box (new Rect (10, 10, timeb, 20), "", bstyle);

Second problem:(always appears)

NullReferenceException
player.Update () (at Assets/Scripts/player.js:13)

keyRot.transform.Rotate (Vector3 (0,1,0));

Please. Some help.

Thanks.

For the first one, you have either not declared AND allocated a bstyle or timeb

For the second one, you have probably not declared AND allocated keyRot.

Note you could also use Vector3.up