Forum

Darkplaces File system not working?

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Darkplaces File system not working?

Postby Mexicouger » Wed Aug 08, 2012 4:35 pm

Hey all. I recently updated my Darkplaces engine to a newer build (Because the one I have been using is very outdated. Don't even know how I got it.), and I've been spending the last few days trying to fix what should be an easy problem. Basically My problem is that almost nothing involving text file and saving seems to be working. Say I use the command "save [Whatever]" in a match. It will say it saved and all, but my file will not actually save anywhere. Same with in-game file saving and loading (fopen, fclose, etc.). Those say they opened or saved a file, but didn't actually do anything. My prime example is taking screenshots. It says it took a screenshot and put it in the screenshots folder, but really didn't do anything but put up some text on the screen. I would also like to note that effectinfo.txt works.

The game loads all the graphics, progs.dat csqc.dat, config, models, maps, etc. Just not what I have mentioned so far. I don't know what the problem is. I haven't touched anything in the engine except set my directories up to my own folder name in the engine:

common.c
Code: Select all
{ GAME_NORMAL,         GAME_NORMAL,         "",               "-aug",         "Augustine",         "augustine",   NULL,      "Aug",         "augustine"      },


That's all I have touched. It's really becoming a problem as I really need read/write access at this point for text files.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Re: Darkplaces File system not working?

Postby Spirit » Wed Aug 08, 2012 4:43 pm

strace -e trace=file -o file.log
could help you to see if the attempts get through to the OS
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1031
Joined: Sat Nov 20, 2004 9:00 pm

Re: Darkplaces File system not working?

Postby Mexicouger » Wed Aug 08, 2012 4:59 pm

Does that generate a log file in the directory of the game?
Also, Just to note, my last darkplaces build had some heavy HUD code and a completely new menu, and it works just fine. But when I update it, and stick in the old Quake menu and HUD files, it doesn't say its missing unlocatable data or anything. It just doesn't load/save files. I also noticed that Im not even getting a darkplaces_history.txt file either.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Re: Darkplaces File system not working?

Postby Spike » Wed Aug 08, 2012 5:01 pm

-nohome perhaps? does dp support that one or is it fte only? :/
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Darkplaces File system not working?

Postby mh » Wed Aug 08, 2012 5:44 pm

My bet is also on it being saved to your user-profile directory.

DP does have -nohome but I've never used it so can't vouch for how well or otherwise it works. It also has -userdir to specify a custom personal gamedir, but likewise.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Darkplaces File system not working?

Postby Mexicouger » Wed Aug 08, 2012 5:58 pm

Alright I tried Mh's userdir idea and it worked. I mapped the game out to my current directory but I feel like this will limit the game to my computer.

Code: Select all
Augustine -window -listen 8  -userdir C:/users/Tevin/Dropbox/Augustine/Augustine/

EDIT: I tested this and it worked.

Code: Select all
-userdir augustine\

But the problem with that, is that it's loading a folder from inside my main game folder. So It would load from Augustine[Root with .exe and.bad]>augustine[has progs.dat, progs, maps, etc]>augustine[a new folder that loads screenshots, darkplaces_history.txt, etc.]
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest