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.