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 / error with BOX?

Author
Message
RAWRpowRAWR
13
Years of Service
User Offline
Joined: 25th Dec 2010
Location:
Posted: 26th Dec 2010 02:25
Okay, I've got a tiny little loop in my code to make a box move across the screen. When I put it in, the program fails to compile, when I take it out, runs fine. What's wrong with it? Also, I had the same problem with "IF KEYSTATE(x)" is on functions, the program won't compile, but when I take it out, compiles fine.
Anybody got any tips?



- RPR
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 26th Dec 2010 02:41
Compiles fine for me, I did a little modification as I didn't have your subroutine. I can only imagine the reason your program isn't compiling is because something in your subroutine J2, is causing a problem.

DO
BOX# = BOX# + 96
BOX (BOX# - 96), 50, BOX#, 70
WAIT 500
IF BOX# = 1920 Then Text 10, 10, str$(BOX#)
LOOP
RAWRpowRAWR
13
Years of Service
User Offline
Joined: 25th Dec 2010
Location:
Posted: 26th Dec 2010 03:29
Even if I open a new project and type a single line of telling it to create a random box, it will still not compile. Same thing with "IF KEYSTATE(X) = 1...", in a blank project it still won't compile.

- RPR
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 26th Dec 2010 12:04
Which version of DBPro do you have?

A clever person solves a problem, a wise person avoids it - Albert Einstein
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Dec 2010 12:51
What's the actual error message? What's the whole of the code you are trying (and I'm talking here about the code you talk about in your second post)?

Given some actual information, we may be able to help

Login to post a reply

Server time is: 2024-09-29 00:21:06
Your offset time is: 2024-09-29 00:21:06