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.

DarkBASIC Discussion / Problems My Loop

Author
Message
Computer Nerd
20
Years of Service
User Offline
Joined: 25th Jan 2005
Location: What do you care?
Posted: 5th Feb 2006 05:14 Edited at: 5th Feb 2006 05:15
I'm currently working on a 2d tut for newcomers and it's teaching me some stuff too anyways, my program freezes some point in code. You've been warned if you excute it.


Programming is fun with DarkBASIC!

Attachments

Login to view attachments
hexGEAR
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 5th Feb 2006 05:47 Edited at: 5th Feb 2006 05:50
You got no sync in your do loop. You have correctly activated sync with the sync on command and set a sync rate to 40 but your do loop should be like:

do
if inkey$() = "1" then oneup = 1:exit
if inkey$() = "2" then twoup = 1:exit
sync
loop

You also got a play music & loop music command when you should just have 1 of them. Apart from that, your code looks great. Dont forget about that wait key command in there, you have to hit a key before it continues.

Computer Nerd
20
Years of Service
User Offline
Joined: 25th Jan 2005
Location: What do you care?
Posted: 5th Feb 2006 19:47
Thanks! That fixed that problem!

Programming is fun with DarkBASIC!

Login to post a reply

Server time is: 2025-05-23 10:58:28
Your offset time is: 2025-05-23 10:58:28