News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

Major Save As problem

Started by theheadmoose, April 08, 2008, 05:00:19 PM

Previous topic - Next topic

theheadmoose

I have been working on a game and have three seperate programs saved within a single folder. (The actual game, blank level data file creator and a level editor).  The last program saved was the program to create a blank level data file. To my absolute horror this very short program has overwritten EVERY file in the c:\Program Files\Playbasic\Projects folder. I have lost everything else.  Is this normal !
Is there any possible way to undo the damage?  The little warning about "Saving will overwrite files in this folder (and sub folder). Do you want to proceed",  doesn't exactly explain the damage that Save As does

Big C.

Yes, because PB has a project Structure... So, if you don't change the structure under Project -> Manage Project (or see helpfiles) then you will get minimum 3 Files: Main.pba, ProjectX.pbp and ProjectX.pbr.  X represents the Project Number you have created in a PB-Session, like 1,2,3..etc.

The problem is, if you creats 2 Projects you will get 2 Files of the same name ==> main.pba.... This File contains your program code. If you save as both projects under the same folder then the first main.pba will overwritten from the second. Solution: Rename Projects (or/and included Projectfiles. You can split your project in mor than one file i.e. Gamemain.pba, GameDecl.pba, GameFunctions.pba and so on) and save more than one projects under different folders.

theheadmoose

Thank you for the explanation. Now that I understand the SAVE function does has some logic to it I wont be making that mistake again.  I do think that perhaps this project structure approach should be made clearer to us who are new to PlayBasic.

Thank you once again.  Regards  The Head Moose