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 Professional Discussion / I Don't Know How to Program

Author
Message
Sequence
15
Years of Service
User Offline
Joined: 16th Mar 2011
Location: Canada
Posted: 5th Oct 2011 05:05 Edited at: 5th Oct 2011 05:05
I have been writing BASIC programs since 1981.

But I don't know how to program, it appears.


I started using darkbasic about a month ago.

I don't know the difference between "project" and "file".


I start DarkBASIC and load a "file" (whatever that is).


Then I run the program. It runs. I've made about 3 changes, then thereafter it seems to be running something else. It has about 75 lines of code.

I put in the control statement Print "I am here" and Wait key near the end, it doesn't print them. I put them close to the middle, it doesn't print them. I put it RIGHT AT THE BEGINNING, it DOES NOT PRINT THEM!!!!


I ERASE EVERY DAMN LINE OF CODE until the ONLY code is

Print "I am here"
wait key


And I DO NOT SEE THOSE TWO LINES APPEAR, instead I get every letter of the alphabet in upper and lower case printing on the screen, which is the ORIGINAL PROGRAM that I loaded when I started!!!!!!!!


darkbasic is broken.

If all the "1"s are in the right place, it'll work like a charm.
Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 5th Oct 2011 07:05
Exit DBPro, go back in, try it again. See if that fixes it.

I've had that same issue myself.
Sequence
15
Years of Service
User Offline
Joined: 16th Mar 2011
Location: Canada
Posted: 5th Oct 2011 07:23 Edited at: 5th Oct 2011 07:25
****
Have to add that when I said "Then I run the program. It runs. I've made about 3 changes, then thereafter it seems to be running something else. It has about 75 lines of code."

The "something else" is my old code without my newly entered instructions.
****



It is ALWAYS doing the same thing.


Turns out that, when I load a file, a new tab is opened and the file is put in there.

HOWEVER, there is a tab before it called "untitled1". Turns out that after my program stops working with my modifications, if I CLOSE that "untitled1" tab, my program seems to then work fine.





****
Okay, new problem.... I choose "save as" I save it as a new name.... I do NOTHING right after except for choose "exit", and it comes back with "The project has been modified. Do you wish to save changes?" Errrr, what's up with that? Especially since I ORIGINALLY "loaded a FILE".

If all the "1"s are in the right place, it'll work like a charm.
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 5th Oct 2011 08:15
Quote: "I don't know the difference between "project" and "file"."


You really need both to run properly. The project file has an extension of .dbpro which holds all the information for the project like which .dba files to use (.dba is the actual code). In the IDE when you save always use SAVE ALL so it saves both the .dbpro file and .dba file.

BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2011 10:07
Your problems are really about moving from a computer interface to a 3D environment. Even printing text is done in 3D so to speak, because your canvas is now DirectX, not a basic PC command interface.

Instead of:


try



PRINT is not persistent, it needs refreshing after every sync. You may find the above is a bit unstable and flickers.

Now move to this:



You are now in control of when the screen synchronises. It will refresh at 60 frames per second. In such a simple program it essentially means that it will be waiting to refresh 99% of the time...SYNC will wait for 1/60th of a second to pass before executing.

Here endeth the first lesson in the wonderful world of games programming

Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 5th Oct 2011 10:19
It's standard practice in coding to have a Project file (which manages the relationships between source files, the compiler, media, etc.) and the source files (which are just plaintext files).

Which IDE do you have? DBPro IS notorious for annoying editors with odd "features" that make things not work.

If you were working on a project and clicked "create new file", then compiled, I'd bet it thinks that file belongs in your project, and so it runs the current project instead of a file.

Login to post a reply

Server time is: 2026-07-11 14:37:14
Your offset time is: 2026-07-11 14:37:14