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.

Newcomers DBPro Corner / add to queue gTimer() <- What does this do?

Author
Message
Wetlander
21
Years of Service
User Offline
Joined: 28th Sep 2002
Location:
Posted: 28th Feb 2007 15:42
I can't seem to find this in the help files anywhere. What is the 'add to queue' command? and what is it doing here in this line of code? This is a line from a game timer in one of the old newsletters. and i prefer to know how each line of code works before i try to use anything. thanks for the help!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Feb 2007 16:09
gTimer() is a dynamic array, not to be confused with Timer() which is the command that returns to system time (in milliseconds). gTimer is defined by the user.

ADD TO QUEUE adds another element to the array. So if gTimer() had 10 elements, it now has 11.

If you are looking at my timer tutorial, it was probably far more complicated than it needed to be. But still useful all the same



Wetlander
21
Years of Service
User Offline
Joined: 28th Sep 2002
Location:
Posted: 28th Feb 2007 16:27
actually, i'm trying to convert the code from your tutorial to javascript. so it's a simple push statement. I'm trying to do a game that can operate via it's own client (Db) and a simpler version built within a web page (using new canvas tags). So i'm trying to get as much code as possible duplicated between the two.

Login to post a reply

Server time is: 2024-09-25 19:27:45
Your offset time is: 2024-09-25 19:27:45