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 / Loop problem in DarkGDK

Author
Message
Mew151
16
Years of Service
User Offline
Joined: 1st Jun 2008
Location: Glitch city
Posted: 7th Nov 2008 02:14
Whenever I use a loop, the screen turns all black! What's the problem?

Is there a simpler way to do this?

ow! that hurt!
Mason
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 7th Nov 2008 05:17 Edited at: 7th Nov 2008 05:19
That loop works fine, but its a little unorthodox for what your trying to accomplish. For loops are generally used when you have a starting and ending condition thats already known ie. subscripting arrays or repeating something a set number of times.

A good loop to use would be something like a while loop:



It's important to note that I placed the dbSync() command inside the loop. This is what 'updates' the screen. That would explain why your getting a black screen.

Edit:

Oh and make sure that the condition in the while loop is true. If running doesn't equal 1 (it's preset to 0) then your loop won't run because the condition isn't true. And if you want the loop to quit when you press the spacebar or something as such, just make running = 0 and the loop will end.


Login to post a reply

Server time is: 2024-11-25 05:46:10
Your offset time is: 2024-11-25 05:46:10