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 / My code has been cleared!

Author
Message
zerosimms
15
Years of Service
User Offline
Joined: 25th Feb 2011
Location:
Posted: 23rd Mar 2011 11:47
This morning I went to open my project only to discover all my code had gone!!

I looked in the folder where I save the dba file and there was a ".pck" does anyone know what this is?
I made a copy of it and changed the extension to .dbpro and.dba on the hope that it would contain my code but no joy.

I'm really gutted if anyone knows how I can recover my code (does DB-pro make a tmp file anywhere) I would be so grateful.
Thanks in advanced!

www.bensimms.co.uk
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 23rd Mar 2011 13:49
Yes, I think it should combine your source and uses that to compile - so when you have included code, it all merges into 1 source file. Maybe find your DBPro compiler folder and do a search for .DBA - I don't have DBPro handy or I'd say the exact location. Try not to compile anything until you get it back.

There should be a .Bak version as well - I'm sure it does that when you compile as well. The PCK file is probably all the media for the project compacted like a ZIP file.

Health, Ammo, and bacon and eggs!
Booma
17
Years of Service
User Offline
Joined: 29th Mar 2009
Location:
Posted: 23rd Mar 2011 14:24
PCK file doesn't contain media. All dll's from exe are transferred to this file.
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 23rd Mar 2011 14:25
Well, other than being disappointed that this bug still occurs from time to time, i suggest that you should switch files quite frequently. Like with most programs not just DBP, i tend to make at least 2 different files of the same, and once i save to the first, sometimes to the second.

Because this isn't only happening with DBP. For example 3DS Max LOVES f-ing away my precous data. Photoshop on the other hand never did anything like it, that program is very reliable.

For coding, i upgrade the filename, which is the version number usually, at every major step up, and archive the pervious ones for emergencies like this.
Brendy boy
21
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 23rd Mar 2011 14:33 Edited at: 23rd Mar 2011 14:35
Quote: "For coding, i upgrade the filename, which is the version number usually, at every major step up, and archive the pervious ones for emergencies like this. "

me to

Quote: "I'm really gutted if anyone knows how I can recover my code (does DB-pro make a tmp file anywhere) I would be so grateful. "

There is a TEMP folder inside Dark Basic Professional folder where the latest compiled source code is placed

zerosimms
15
Years of Service
User Offline
Joined: 25th Feb 2011
Location:
Posted: 23rd Mar 2011 23:27
Quote: "There is a TEMP folder inside Dark Basic Professional folder where the latest compiled source code is placed"

Hey Brendy boy any idea where the TEMP folder is? I've gone through my Games Creator directory and not had any luck finding any temp files.

www.bensimms.co.uk
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Mar 2011 23:35 Edited at: 23rd Mar 2011 23:37
That's for the old IDE.

If you are using the newer IDE, then I find that leaves all of its temporary files in place in your local temp directory, which is:

For Vista/Windows 7
c:\user\<your user name>\AppData\Local\Temp

For XP
c:\Documents and Settings\<your user name>\Local Settings\Temp

Look for all of the files starting with dbp and ending in .tmp, sort them by date, then start going through them with an editor (notepad?) until you find the one you want.

[edit]
You might have these directories hidden. If so, just type them into the address bar in an explorer window and they'll work.

BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 24th Mar 2011 06:16
You should get in the habit of using revision numbers with your source code, like filename-1, filename-2 etc.

Rev your source code every day or more frequently if your prefer, that way the most you will lose is 1 day worth of work.

Source code files are small so don't worry about wasting space.
This is a VERY good habit for all programmers to get in the habit of doing.
zerosimms
15
Years of Service
User Offline
Joined: 25th Feb 2011
Location:
Posted: 24th Mar 2011 12:25
Guys, thanks very much for your help!

I have sadly lost the file altogether including the temp files, gutting. I'm new to coding so it's probably not a bad thing starting again fresh, I have already got 50% of the code re-done and it's much tidier this time round

I'm also using BlueIDE which is a free alternative to the dark basic's editor:
http://blueide.sourceforge.net/#dl
It has a great "backup" feature that creates a duplicate of your code in a different folder structure, so that if one file does become corrupt/damaged etc There is a second file to fall back on. (just remember to keep pressing it often)

Also, I'm saving my files in to a synced "DropBox" folder so that my files not only get saved locally but also in the cloud!
I'm hoping this time, I have got every angle covered.
Thanks again for all your advice, I tried most of it!

www.bensimms.co.uk
sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 24th Mar 2011 20:45
I make a copy of my code in notebook when I am done for the day and I am saving it. Over the years I have lost tons of code.
renny
P.S. even the new IDE does it some times

Life is not fair, so deal with it.
http://www.gusroundtable.com/
tiresius
23
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 25th Mar 2011 03:06
I backup my long-term project to some server somewhere so even if my PC burns up I'll still have it...


A 3D marble platformer using Newton physics.

Login to post a reply

Server time is: 2026-07-17 08:12:32
Your offset time is: 2026-07-17 08:12:32