Saving problems...

Posted by Scythe on Wed 08 Aug 2001 03:41 AM — 31 posts, 102,018 views.

#0
Yeah, I'm new to Smaug and I was wondering why it seems not to save correctly? I have already made sure that the folders are in the players dir (a-z folders, all there...)

Might anyone know any other causes to this saving problem?
Australia Forum Administrator #1
Which version are you using? The precompiled .exe file, or are you using Cygwin and compiling it yourself?
#2
I'm using the precompiled exe, why?
Australia Forum Administrator #3
It helps when problem solving to know which version you are using. :)

If you have the player directory and one directory for each letter of the alphabet inside it, then it should work.

Is there an error message on the console output when the character is saved?
#4
No error messages, the directorys go smaug\player\a and so on, which should work, but it just doesn't =/
Australia Forum Administrator #5
This is a guess, but try this ...

Make another directory "backup" at the same level as the player directory, and put the directories "a" to "z" in that as well.

I think your "save" flags ("Saveflags" in system.dat) indicate that a backup is to be made, and that is in the backup directory.
#6
Wow, it worked, thanks! Saving is fixed...
#7
Nevermind, I started it up and it seemed to work, cept now it doesn't save...again, all the folders are there, all the backup folders are there too, I just don't see whats wrong..
Australia Forum Administrator #8
What happened between working and not working? Must have been something? Are you using NT 4/2000 is it a permissions problem?
#9
Well, as far as I can tell this is what happens to be the problem...

I can save, it works perfectly for me now (before it didn't though..)...some other people can save, but not many, which is kind of odd, I made sure all the letters were there in both player and backup dirs, so I'm not sure what it is.

(I'm running Windows 98)
Australia Forum Administrator #10
All I can suggest is download Cygwin, and compile it under that (Cygwin is free). Then, if the problem persists, which it probably won't, use the debugger to find out why.
#11
I would just like to say that I am having the same, or a similar problem with the mud. I will try to explain what occurs.

I make a character, then save and quit out so I can change him to 65 and be the Imm account.

Then after I edit the pfile and I log on and go kill something, change skills, pickup items, etc. after I log off and come back I am reset again back to the Default lvl 65 with default skills, hp etc. that is in the pfile

It doesn’t seem to save anything I do. I even tried to make a new char and ‘Advance’ him with the first one. But after I quit and come back he isn’t 65 anymore. I don’t think my mud is actually writing to the pfiles at all. What could be the problem do you think?

#12
As an update. I read previous posts in relation to this.

I do have a backup folder with all the letters of the alphabet and I am not missing any letters..

I have done some testing and Nothing is ever saved into the backup folders as of yet.

BTW> what is the god file that is in the Player folder?

-Kevin
Australia Forum Administrator #13
When I look at the recent source I see this:


#define PLAYER_DIR "../player/" /* Player files */
#define BACKUP_DIR "../player/backup/" /* Backup Player files */
#define GOD_DIR "../gods/" /* God Info Dir */
#define BOARD_DIR "../boards/" /* Board data dir */
#define CLAN_DIR "../clans/" /* Clan data dir */
#define COUNCIL_DIR "../councils/" /* Council data dir */
#define DEITY_DIR "../deity/" /* Deity data dir */
#define BUILD_DIR "../building/" /* Online building save dir */
#define SYSTEM_DIR "../system/" /* Main system files */
#define PROG_DIR "mudprogs/" /* MUDProg files */
#define CORPSE_DIR "../corpses/" /* Corpses */


This suggests to me (2nd line from top) that the backup directory should be *under* the player directory. Try that.

#14
Already is... plus i made a copy of the backup folder containing all the letters and put it in the main directory as well, just in case.

Did some more testing. no chars are ever saved past the point where you enter the game and they are automatically made as lvl 2.

-Kevin

Using windows 2000. And all the files have 'Everybody' full access on them. So i dont know if its permissions.
Australia Forum Administrator #15
I just tried using the precompiled exe in file "smaug1.4a.zip" from my Downloads page.

I created a new character "Nick" which I then saved successfully, logged off and reconnected. I changed rooms, saved, logged off, reconnected and I was in the new room.

It certainly seems to work for me, at least for "Nick" character.

Is there anything funny in the character names you are using? (eg. an asterisk).
#16
Hello I am also new to using a MUD server, however I am having the same problems as KH16 and have tried all the same solutions. I have a player dir with all the folders a, b, etc and a backup folder inside of the player dir with the same folders. I am also running Win2000 and all the permissions are set correctly. Any ideas of why my characters including my 65 Immortal cannot save their progress?
Australia Forum Administrator #17
Make sure you have a "gods" directory as well.

See if there is a file around called "charsave.tmp" - it initially writes the player file to that and then renames it. Maybe that procedure is not working.
#18
Yes the God's Dir does exist, the char that I made to be immortal was already put in there by the program. Yes there is a charsave.tmp file however it doesn't appear to be renaming the file to the characters. If I look at the charsave.tmp file it shows all current info but the file in \players\* does not appear to be updating. How can I correct this?

Thanks for the help
Australia Forum Administrator #19
In my source I changed the write to charsave.tmp followed by the rename, to just writing the correct file in the first place. It seems strange that your copy doesn't do that.

Also, as I said above, it seems to work fine for me.

What you could try is installing Cygwin and compiling the source under that. At least then, if something is wrong, you can change the source to correct it, then recompile.

When I first did the precompiled version Cygwin was pretty dodgy, but nowadays seems to give a pretty good result, so the need for the precompiled version is not as great.
#20
Ok I cannot do that without a lot of help :) I know almost nothing of programing unfortunatly, otherwise I would be using Linux instead of Windows :) Also I noticed that the directories that you specify are not the same that are set up when I use the .zip version. Could that be creating a problem?
Amended on Thu 06 Dec 2001 04:56 AM by Dragon
Australia Forum Administrator #21

The .zip version does not create empty directories, this is a "feature" of WinZip. However the rest should be the same. Can you specify which ones you found different.

As for Cygwin, there isn't much to it, just install Cygwin, download the source archive, extract, and type "make".

This process is described in some detail in the web page How to make changes, including compiling

#22
The only thing I really found different with the folder names upon installation was that in the Windows distribution, the folders came out as \smaug\(subfolders) ... however, in the documentation that came with it, it states that it should have been under \dist\src. I was just wondering if that may be the cause of the problem. I still cannot get any of the characters to save - upon initial character creation, the character's file is created in the appropriate folder, but is not updated after the initial creation. When a character "saves", the file charsave.tmp is created - but the file is not renamed and transferred to the individual player files. This has to be done manually to complete a save.

Thanks again for all the help, I really appreciate it.
Australia Forum Administrator #23
Did you use the precompiled version "smaug1.4a.zip" mentioned on the top of this page? Unless I am going crazy (a possibility I suppose) then that version should have the "rename" concept replaced by writing the file directly, as that is what the source I have here does.

Also, I tested it and it works fine here.
#24
Can you tell me where I can get the copy of smaug1.4a.zip and cygwin that you are using please?
#25
I am really sorry to say this, but I downloaded the version from your site and everything works perfect. Thank you for all your time and help anyways :)
USA #26
I compiled smaug using borland, had same problem i think
even with all the backup and a-z directories. When the first save for a char is made it works fine but afterwards saving doesnt work and the pfile from 1st save remains. using windows 98 and not sure what to do
Australia Forum Administrator #27
Sounds like rename or something isn't working. Saving is actually done under a temporary name which is then renamed once the save completes (so you don't get a half-saved character).

Thus the first will work. Check out the rename part in the source.
USA #28
Only diff from stock smaug and what im compiling in save.c is the patch you put for compiling with the free borland compiler

236c236
< fchmod(fileno(fp), S_IRUSR|S_IWUSR | S_IRGRP|S_IWGRP | S_IROTH|S_IWOTH);
---
> // fchmod(fileno(fp), S_IRUSR|S_IWUSR | S_IRGRP|S_IWGRP | S_IROTH|S_IWOTH);

other then that i cant think of anything and as for that line im at a loss
Australia Forum Administrator #29
Try downloading Cygwin and compiling with that. It's free too.
#30
Im having the same or similar problem.

Lets see...Im running Win98, downloaded this 1.4 version, I do have the player (a-z) folders and this backup folder.
Running server and client on same PC.

Now funny; I login with a char I made..save, quit, reconnect...
Once of about 20 tries it DOES save my char...the other 19 tries my char is resetted totally.

What I did notice though, is that in the dos server window, everytime it actually 'did' save, I get something like blabla 'reconnected'...otherwise it just says 'connected'

Really frustrating and strange, specially since it sometimes, in rare moments, does save.

Help would be really appreciated since Im all new and curious about all this and have friends wanting to join in on playing but this way we sadly cant :(

Regards
Red

Edit:
In addition what I noticed, in those rare occasions it did save my char, upon relogin, it says something weird in server window...blabla-scriptor: file exists ?
I sadly dont have the exact message and have a hard time recreating it since saving is very rare, so is that message but when I see it, I instantly know saving worked.
Also, when I manually delete the char file, and type 'save' in client, it 'does' create a new file for my char there...so I thought 'yay' it saves...but it still resets my char on most reconnects.