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.

Author
Message
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 29th Nov 2013 16:44
Often dbpro fail to compile, syntax errors without reason...then when i hit F5 again...magic it compile properly!
Sometimes it compiles white window and i need to shut it from task manager.
And the most annoying bug is the indentation bug.For no reason dbpro start to mess with the indentation, when i pick line it does not put the cursor properly, i can't select what i need because it shift selection about 4 spaces in the left.If i get rid of the indentation it's ok.There is no problem if i work on some small junk of code while testing, i'm willing to rewrite everything from scratch but sometimes this happens with my main project which at the time could be few hundreds or even thousand lines of code.

If you know what cause this or how i can get rid of indentation bug please tell.

I use windows 7 by the way.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Nov 2013 20:32 Edited at: 29th Nov 2013 21:02
Quote: "If you know what cause this or how i can get rid of indentation bug please tell."


I've encountered the symptoms you describe very rarely - and not at all yet on this W7 laptop which I've had for over a year. The only thing I can suggest is the following:

1. Make a backup copy of the project's .dba files just in case.

2. Open up each .dba file in something like Notepad and copy the code to the clipboard.

3. Paste it back in to the same place and save it.

4. Repeat 2. and 3. for each .dba file in the project (or the ones giving the problem).

5. See if you can now edit the project files in the usual way in DBPro.

If that doesn't work, try copying the code text into the DBPro editor itself or some other variant of the above steps.

The rationale behind this is that it's possible that the .dba file has got corrupted somehow and non-printable characters have somehow got into the file - but these might get ignored or lost when you use another text editor such as Notepad.

Unfortunately, I can't now recall which particular combination of copy and paste did the trick but it was something along the above lines. If I recall correctly, Scraggle posted a similar problem a few years back. If I can find his post I'll give the link in this post.

I doubt W7 has anything to do with this.

Edit

Found the link! Here it is:

http://forum.thegamecreators.com/?m=forum_view&t=107470&b=1&msg=1208335#m1208335

[href=http://forum.thegamecreators.com/?m=forum_view&t=107470&b=1&msg=1208335#m1208335]
Scraggle's weird editor problem[/href]

Edit999 Why has the simple task of inserting links suddenly become impossible.

Took a while to find and not sure how relevant it is but worth a shot.



Powered by Free Banners
sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 29th Nov 2013 22:15
What I do is copy the all the lines of code put it in notepad
and save it. then I delete DBP files. Then I open up a new DBP file and save it as source and project blank (no code).
then I copy the code from notepad and paste it in to the blank DBP
files save both file again with the code this time.
Hope this helps
renny

Life is not fair, so deal with it.
http://www.gusworks.com/
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 29th Nov 2013 23:14 Edited at: 29th Nov 2013 23:34
What I do is store a copy of the FullSourceDump.dba in a text file every time I compile into a folder. Simply chuck this function at the top of your program and supply it with a location to copy from:



It uses Ian M's matrix dll but can simply be re-writing if you don't have it. The sourcePath is the file path for the .dba you want to copy. FullSourceDump.dba is in the Temp folder inside you Dark Basic Pro Directory. I use if I want to manipulate anything in the code while writing it so things aren't written, bit more advanced.

You can just use copy file btw for a simpler version:



Lastly you could check to see if anything different between the last file and the new one and store those edited lines in an alternate file. This would help with smoothing out error a lot quicker.

"Get in the Van!" - Van B
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 30th Nov 2013 02:07
Quote: "What I do is copy the all the lines of code put it in notepad"

This is how I save all my code. DBP is not to be trusted when it comes to saving files.

http://www.indiedb.com/games/max-vs-mars
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 30th Nov 2013 02:18
Quote: "This is how I save all my code. DBP is not to be trusted when it comes to saving files."


But I doubt you'd do this every time you compile. Hence why it's just easier to save the files via DBP, thou I only use Ian M dll to limit errors if any.

"Get in the Van!" - Van B
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 30th Nov 2013 02:25
It will fail to compile if the executable you're compiling to is locked - that may happen if it has still not finished shutting down (might happen sometimes when you've loaded lots of media that needs to be released after closing the program) or is the file is somehow open otherwise. If this happens the editor will still save the altered source file(s). Then when you go to compile again it will look at the files, determine that they haven't been changed since the last save and thus won't reconstruct the FullSourceDump.dba file. It will still compile the old one though... Now if that doesn't match your current project (ie. the last project you compiled was a different one, or the dump file has been cleared (this seems to happen every now and then, usually when opening a new, blank project - such as when the IDE is started)) you can get things like errors (trying to load non-existing media, invalid file paths etc.), a window that just opens and closes immediately again (no source compiled), a window that freezes or displays a solid colour (this also seems to be caused by missing media) and so forth. I'm not sure if this is at all related to what you're experiencing but just putting out my own experiences. When this particular issue occurs it is enough to add a space to your source, remove it again and hit "compile" once more.
The problem where the project (.dbpro) file gets corrupted has luckily been absent from my system for years, but maybe it still lingers on for some...


"Why do programmers get Halloween and Christmas mixed up?"
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 30th Nov 2013 23:20
Annoying as Hell... non-descriptive thread titles?


Formerly OBese87.

Login to post a reply

Server time is: 2026-07-06 07:51:05
Your offset time is: 2026-07-06 07:51:05