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 / Random - I get same number whole the time!

Author
Message
CheatCat
17
Years of Service
User Offline
Joined: 7th Mar 2007
Location: Sweden
Posted: 7th Jun 2008 21:36
Yes, the numbers don't change. Help me!

elantzb
16
Years of Service
User Offline
Joined: 10th May 2008
Location: Classified
Posted: 7th Jun 2008 21:39 Edited at: 7th Jun 2008 21:40
you've got to set up the random number generator.

try throwing this in near the top of your code:



EDIT: preferably right at the beginning of DarkGDK(void)
elantzb
16
Years of Service
User Offline
Joined: 10th May 2008
Location: Classified
Posted: 7th Jun 2008 21:44
Also, if you want a new color every cycle, you'll want to move your:



into the while loop you've got there.

And, you may need to set the position of the text you're printing by calling dbSetCursor() before each dbPrint().
CheatCat
17
Years of Service
User Offline
Joined: 7th Mar 2007
Location: Sweden
Posted: 8th Jun 2008 20:35 Edited at: 8th Jun 2008 20:35
Thanks! And, no, I don't wont to have a flashing cube!
elantzb
16
Years of Service
User Offline
Joined: 10th May 2008
Location: Classified
Posted: 10th Jun 2008 02:10
all in a day's work.

Login to post a reply

Server time is: 2024-11-17 17:36:12
Your offset time is: 2024-11-17 17:36:12