# problems with javascript in Time.time

**URL:** https://discussions.unity.com/t/problems-with-javascript-in-time-time/497129
**Category:** Scripting
**Tags:** Scripting
**Created:** [February 9, 2013, 11:41pm UTC](https://discussions.unity.com/t/problems-with-javascript-in-time-time/497129 "2013-02-09T23:41:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sky8pedro](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sky8pedro](https://discussions.unity.com/u/sky8pedro)
#### Post date: [February 9, 2013, 11:41pm UTC](https://discussions.unity.com/t/problems-with-javascript-in-time-time/497129/1 "2013-02-09T23:41:30Z")

</div>

Hello, I’d like some help.  
Why does not the script, a mistake?  
It does not count.

thank you

![1160457--44322--$Captura de ecrã 2013-02-9, às 23.29.09.png](https://europe1.discourse-cdn.com/unity/original/4X/9/d/5/9d52db0c24cef660223cbfeb67372b336c71568e.png) ![1160457--44323--$Captura de ecrã 2013-02-9, às 23.29.25.png](https://europe1.discourse-cdn.com/unity/original/4X/3/1/c/31c4db2873a9d8254164d1d3cdc386378ce2f2d1.png)

//variaveis  
var playTimeT : float = 0.0;  
var days : float = 0.0;  
var hours : float = 0.0;  
var minutes : float = 0.0;  
var seconds : float = 0.0;  
var milesimos : float = 0.0;

function Update ()  
{  
playTimeT = Time.time ; //error !!???

days = ( playTimeT / 86400) % 365 ;  
hours = ( playTimeT / 3600) % 24 ;  
minutes = ( playTimeT / 60) % 60 ;  
seconds = ( playTimeT % 60) ;  
milesimos = ( playTimeT \* 10) % 10 ;

}

function OnGUI ()  
{  
GUILayout.Label ("playTime " + playTimeT);  
GUILayout.Label ("Time " + seconds.ToString (“f0”));

}

---

<div class="post-metadata">

### Author: ![sky8pedro](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sky8pedro](https://discussions.unity.com/u/sky8pedro)
#### Post date: [February 10, 2013, 10:43am UTC](https://discussions.unity.com/t/problems-with-javascript-in-time-time/497129/2 "2013-02-10T10:43:21Z")

</div>

Thank you already understand the problem, the javascript file was named Time was enough to change the name TimeT.js is working …

Thanks anyway.
