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 / [SOLVED] Bad problem with my IDE

Author
Message
Alduce
19
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 19th Oct 2021 21:48
Hi guys I have a bad problem using my Synergy Editor IDE.

look at picture:


You can notice that I am using many dba files in my game.
When these files was 3 or 4 I was fine with no problems but when I start to use more dba files I got a bad IDE error.

In a normal situation If I made an error writing my code or if born an error (for example a out of array index) and I try to compile I get IDE showing the line of the error with a description of that error.

When I start to use more dba files, (dba files where I put a lot of codes called by gosub command in other dba) I get my IDE showing a code line where there are NO ERRORS!
The description of the error is right but my IDE is wrong when it showing me the error code line.

I hope my poor english are enought good to let you understand that problem.

You can understand that this is a REALLY big problem. When was all ok with my IDE I solved errors easly using IDE showing the right error line. Now is simply a hell of work!

Somebody got same problems?
Maybe I need to reduce my gosub commands? or I need just to put the code called using the gosub command in the same dba file in witch I using the gosub command?

All help will be really appreciated



Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

Raven
16
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 21st Oct 2021 17:39
This post has been marked by the post author as the answer.
This has nothing to do with Dark BASIC Professional, but rather is a known issue with Synergy IDE.
In essence the issue is that the Line No. that the DBPCompiler.exe will report an issue on., will be based against the #Included Ordering of the Source Files., where-as Synergy IDE assumes their order to be how they're listed in the Project File.
So... let's say we have 4 Source Files with 250 Lines (1,000 Lines Total)., and you're including them
#Include "Source1.dba"
#Include "Source3.dba"
#Include "Source2.dba"

But they're in the Project File as
Main.dba
Source1.dba
Source2.dba
Source3.dba

Well when the DBPCompiler.exe say "There's an issue on Line 780"
DBPCompiler.exe means Line 30 in "Source2.dba"., where-as Synergy IDE will think it means Line 30 in Source3.dba

It's actually a simple enough fix., the problem is that Synergy IDE uses a Licensed UI API; which when it was developed was pretty much an Industry "Go To" for Productivity Apps., even Microsoft used it for Office and Studio; but has since been primarily replaced with Free Options (like Fluent, Xamerian, etc.) or QT Windows (which also now has a License Free version for small / free apps like Synergy IDE).
And as you HAVE to get a License to get access to the Build Libraries., eh... it's just a little too expensive to bother fixing issues, especially for something that isn't really commonly used today.

I do keep meaning to write my own IDE for DBP as I tend to keep going back to it., but it's one of those things where I'll think about doing it when I don't have the time to really start the project; then forget I'd intended to do when I do have some free time.
Generally a workaround is when you change the Include Order., to also change the Project File Order to match... this will fix incorrect Error Lines.
Alduce
19
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 22nd Oct 2021 18:05
Hi Raven, thx for answer. After many different tries I choose to try Indigo. Hoping solve my problem!

John Y
Synergy Editor Developer
19
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 2nd Nov 2021 11:05
Are you using #include, or the solution explorer.

Ideally you shouldn't use #include, and let the IDE build the master source file that gets sent to the compiler. Then the line numbers coming back from the compiler should work correctly.
Synergy Editor - Available for free HERE!
Automate your home!
Alduce
19
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 13th Nov 2021 20:34
Hi John Y, same problem if I using #include or not..

Login to post a reply

Server time is: 2021-12-02 04:14:13
Your offset time is: 2021-12-02 04:14:13