Jump to content

getTickCount( )


abu5lf

Recommended Posts

setTimer( function ( ) 
    local s = getTickCount( )s = ( getTickCount() - s ) / 1000 
    local string = string.format( "%02d(h)%02d(m)%02d(s)", s/3600, s%3600/60, s%60 ) 
    guiSetText(Label,string) 
end, 1000, 0 ) 

It does not do anything !

Edited by Guest
Link to comment

I can't test now, but try this:

setTimer( function ( ) 
        local s = getTickCount( ) 
        s = ( getTickCount() - s ) / 1000 
        local string1 = string.format( "%02d(h)%02d(m)%02d(s)", s/3600, s%3600/60, s%60 ) 
        guiSetText(Label,string1) 
    end, 1000, 0 ) 

If not work, so try this:

setTimer( function ( ) 
        local s = getTickCount( )s = ( getTickCount() - s ) / 1000 
        local string1 = string.format( "%02d(h)%02d(m)%02d(s)", s/3600, s%3600/60, s%60 ) 
        guiSetText(Label,string1) 
    end, 1000, 0 ) 

I just renamed the "string" variable to "string1".

Link to comment
I can't test now, but try this:
setTimer( function ( ) 
        local s = getTickCount( ) 
        s = ( getTickCount() - s ) / 1000 
        local string1 = string.format( "%02d(h)%02d(m)%02d(s)", s/3600, s%3600/60, s%60 ) 
        guiSetText(Label,string1) 
    end, 1000, 0 ) 

If not work, so try this:

setTimer( function ( ) 
        local s = getTickCount( )s = ( getTickCount() - s ) / 1000 
        local string1 = string.format( "%02d(h)%02d(m)%02d(s)", s/3600, s%3600/60, s%60 ) 
        guiSetText(Label,string1) 
    end, 1000, 0 ) 

I just renamed the "string" variable to "string1".

Unfortunately,not work all

Link to comment

try this:

setTimer( function ( ) 
    local s = getTickCount() 
    local s = ( getTickCount() - s )/1000 
    local string = string.format( "%02d(h)%02d(m)%02d(s)", s/3600, s%3600/60, s%60 ) 
    guiSetText(Label,string) 
end, 1000, 0 ) 

If this doesn't work, post the debug error(s).

BTW, is Label defined in your script?

Link to comment
try this:
setTimer( function ( ) 
    local s = getTickCount() 
    local s = ( getTickCount() - s )/1000 
    local string = string.format( "%02d(h)%02d(m)%02d(s)", s/3600, s%3600/60, s%60 ) 
    guiSetText(Label,string) 
end, 1000, 0 ) 

If this doesn't work, post the debug error(s).

BTW, is Label defined in your script?

Label = guiCreateLabel(379,300,725,250,"0",false) 
guiSetFont(Label,"sa-gothic") 
  
setTimer( function ( ) 
    local s = getTickCount() 
    local s = ( getTickCount() - s )/1000 
    local string = string.format( "%02d(h)%02d(m)%02d(s)", s/3600, s%3600/60, s%60 ) 
    guiSetText(Label,string) 
end, 1000, 0 ) 

not work

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...