Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Dark gdk - counter

Author
Message
GC70
14
Years of Service
User Offline
Joined: 12th Jan 2010
Location:
Posted: 13th Jan 2010 02:18 Edited at: 13th Jan 2010 15:19
i have made a counter in my game here the code snippet:

if ( dbTimer() - t >= 1000)
{
++i;
itoa ( i, buffer, 10 );
dbText ( 0, 0, buffer );
t = dbTimer ( );
}
and dbSync() is called further down, the counter does work but what the problem is that i only see the counter for about a millisecond then vanishes any idea why this is doing what its doing?

thanks for any help

Games are better when you can make them your self
GC70
14
Years of Service
User Offline
Joined: 12th Jan 2010
Location:
Posted: 13th Jan 2010 15:19
i have made a counter in my game here the code snippet:

if ( dbTimer() - t >= 1000)
{
++i;
itoa ( i, buffer, 10 );
dbText ( 0, 0, buffer );
t = dbTimer ( );
}
and dbSync() is called further down, the counter does work but what the problem is that i only see the counter for about a millisecond then vanishes any idea why this is doing what its doing?

thanks for any help

Games are better when you can make them your self
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 13th Jan 2010 15:38
Try putting dbText() outside the IF statement.
GC70
14
Years of Service
User Offline
Joined: 12th Jan 2010
Location:
Posted: 13th Jan 2010 17:16
That works great thanks for the help i dont know why i didnt think of that

Games are better when you can make them your self

Login to post a reply

Server time is: 2024-11-20 07:20:59
Your offset time is: 2024-11-20 07:20:59