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 / Code problem

Author
Message
GZMGames Admin
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: vermont
Posted: 11th Apr 2005 09:02
im trying to do this in DBPro and its not really working

Youll notice that it skips the controls and cheat input part completely im trying to have it have a fader without skiping important things.

GZM$="what?"
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 12th Apr 2005 02:54
Don't think anyone will want to remove all the \ in the code.

In Space No One can Hear You Scream! (When your comm Line is cut?)
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 12th Apr 2005 08:21 Edited at: 12th Apr 2005 08:29
I see a few problems, but let's tackle these one at a time. Look at this section of code:



Several problems in there alone. First, you start off with a Wait Key. This will pause the program until you press a key - all good so far. But your following loop is really nothing more than a Wait Key, but programmed out - that is, it waits for a key to be pressed before going on. The problem: it's almost impossible to hit a key on todays computers so quickly that computer won't immediately register the key press again and again - probably 100's of time actually. The result - once you hit the key for the wait key, the pc's key buffer is already filled a quite few more of the same key press - so your Repeat/Until loop is immediately bypassed - making it do pretty much nothing.

So get rid of it. There's no need - you have the Wait Key for that. Or get rid of the Wait Key. Either way, we are going to hang onto the line Key$=Inkey$() for the time being.

Next, we know a key has been pressed. Since we are keeping the Key$=Inkey$() line, we are also storing that value in Key$. So we know right after the line Key$=Inkey$(), Key$ cannot be "". So our next line, If Key$ = "", is also not really needed since this condition will always have to be False. Everything between If Key$="" and Else will never get executed. The code after Else, will always be executed. You probably want something like If Key$="x" instead.

Fix these few issues. Fix up your code a bit more. If you come across more obsticals, just post back in this thread. Have fun!

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
GZMGames Admin
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: vermont
Posted: 12th Apr 2005 10:26
Quote: "Don't think anyone will want to remove all the \ in the code"

i dont know why those are there, there not there in my code when i fisrt pasted it in

GZM$="what?"
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 12th Apr 2005 15:38
Quote: "i dont know why those are there"

Can I guess? You tried to post with the title in all caps or something like that. So the 1st attempt didn't post, so you fixed the title (or whatever) and tried to post a second time. When that happened, all the \ appeared before your quotes and apostrophies (sp?).

Regardless - Find/Replace will happy to take those out for you. Find: "\". Replace: "". You might even be able to edit your post so it shows up better. And then peeps reading this thread will wonder what all the fuss is.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II

Login to post a reply

Server time is: 2024-09-23 17:19:08
Your offset time is: 2024-09-23 17:19:08