Jump to content

[HELP] DebugScript message...


lolman

Recommended Posts

Posted

Hello,

Since I'm using this function :

  
getTimerDetails() 
  

I see messages on debugconsole everytime the timer is false... at the function it says that I can prevent it by using the function isTimer() but I've used all methods (almost) but nothing ...

This is my code :

  
  
theTimer = setTimer(function() end, 2000, 1) 
  
  
function timerDetails() 
    remaining = ( getTimerDetails(theTimer) /1000 ) 
    if (remaining) then 
        if isTimer(theTimer) then 
        dxDrawText("Time : "..remaining, 574, 543, 790, 590, tocolor(255, 187, 23, 255), 1.50, "bankgothic", "left", "top",   false, false, false, false, false) 
        else return 
end 
end 
end 
addEventHandler("onClientRender", root, timerDetails) 
  

If someone could help me to prevent this debug message I'd be glad!

Futuristic Gaming RPG

560x95_00FF66_DDFF00_000000_000000.png

http://adf.ly/1KwDeT

Posted

what about getting timer details after checking if it exists?

if theTimer and isTimer ( theTimer ) then 
    local remaining = getTimerDetails ( theTimer ) 

Posted
Still doesn't work... see the debugs ...

Well, this code:

theTimer = setTimer(function() theTimer = nil end, 2000, 1) 
  
function timerDetails() 
    if theTimer and isTimer ( theTimer ) then 
        local remaining = getTimerDetails ( theTimer ) /1000 
        dxDrawText("Time : "..remaining, 574, 543, 790, 590, tocolor(255, 187, 23, 255), 1.50, "bankgothic", "left", "top",   false, false, false, false, false) 
    end 
end 
addEventHandler("onClientRender", root, timerDetails) 

works here.

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...