Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Won't Save Players/Won't Display Classes

Won't Save Players/Won't Display Classes

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Firedraconian   USA  (32 posts)  Bio
Date Wed 28 Jul 2004 11:36 PM (UTC)
Message
I have downloaded two versions of smaug so far, and neither of them work right.

On both I them, I have gotten rid of the existing classes and races, installing my own instead.

The first version is winsmaug1.4a This version has a src folder, with all the nice code stuff inside. This version, when a new character is made, allows them to choose from all the classes I installed, as well as all the races. It saves a new character fine. However, after saving the fact that a new character is created, it will not save them again. Ever. If I move the character to another room and log off, when I log back on, the character is in the original room. If I change the title, when I log back on, it's back to the default. I have created all the folders under names (A-Z). There is no bug message displayed when I save. In fact, it says, 'Saved...' But, it doesn't save! I have no idea why.

The second version I downloaded from this site, smaug1.4a This version doesn't have a src folder, which might be the problem. When I install my new races and classes, and then attempt to make a new character, the new character only has a choice from the first 4 instead of all 6. In other words, the only classes listed when it goes, "What class do you want to be?" Are the ones numbered 0, 1, 2, and 3. 4 5 are not shown, but on my Immortal character, I can mset myself to those classes. This version saves fine.

So, one doesn't save and shows the classes, one saves and doesn't. Neither work and I'm getting really annoyed, because I can't figure out what's wrong and no one I talk to seems to have any clue either.

X. D. Caeruleus
Draconian Industries
Top

Posted by Robert Powell   Australia  (367 posts)  Bio
Date Reply #1 on Thu 29 Jul 2004 03:50 AM (UTC)
Message
To have all the classes and or races show in creation you need to make sure that you edit the class\race.lst file that lists all the classes\races in it, and they have to be put in there in order too, so that class 0 is first in the list -> class 5.
they have to be spelled correctly with the classname.class and im unsure in windows, but if this is Nux then you need to case them correctly too, ClassName.Class. If your trying to add more races\classes than were origionaly there, you allso need to make a change in code to max race and max class

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
Top

Posted by Firedraconian   USA  (32 posts)  Bio
Date Reply #2 on Thu 29 Jul 2004 04:37 AM (UTC)

Amended on Thu 29 Jul 2004 04:43 AM (UTC) by Firedraconian

Message
Yes, I have all that done already. The classes do not exceed the limit, and are all listed in the file in order.

The more pressing problem to me is the way the other one will not save the players. I think it is some error in the code, but I don't know what it could be, since no error or bug message appeared. It says only 'Saved...', but then doesn't. Is there some bug that usually appears in these files with a patch I am not aware of?

If it helps, the version that this is occuring with was downloaded from this site:

http://www.cs.utk.edu/~london/smaug/downloads.html

It is the second one, the "Windows version of Smaug 1.4a with bug fixes applied." which will not save. I'm pretty sure it's a problem with the original coding, since I haven't changed it at all, but it still will not save correctly.

If there is a better version you can recommend, I can use that one instead. But I would prefer one that has the online coding feature so that I don't have be fluent in C to add or change classes, but one that has the other method available just in case.

X. D. Caeruleus
Draconian Industries
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #3 on Thu 29 Jul 2004 06:56 AM (UTC)
Message
There is a problem with some versions of SMAUG, in that it saves by writing a temporary file (in case the server crashes half-way through the save) and then renames it. Under Linux you can rename a file over an existing one, under Windows you can't. Or vice-versa. Whatever.

That is the part to look for. Search this forum, I think this has been covered a few times. All it might require is to delete the old player file one line before renaming it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Firedraconian   USA  (32 posts)  Bio
Date Reply #4 on Thu 29 Jul 2004 05:25 PM (UTC)
Message
I searched for it, and I think you mean what Satsui is talking about, right?

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4402

Well, I tried that, so it now says,

if (ferr)
{
perror(strsave);
bug("Error writing temp file for %s -- not copying", strsave);
}
else
{
remove(strsave);
rename(TEMP_FILE, strsave);
}}

re_equip_char( ch );

quitting_char = NULL;
saving_char = NULL;
return;
}


But, it still isn't saving. I closed down the mud, reopened it, made an entirely new character, saved it, logged off, logged back on, changed rooms, logged off/on, and the change didn't save. I was still in the first room...

X. D. Caeruleus
Draconian Industries
Top

Posted by Buck   USA  (23 posts)  Bio
Date Reply #5 on Thu 29 Jul 2004 06:26 PM (UTC)
Message
I had the same problem; there is a win executable version that works pretty good called smaug1_4a_W32bin, but I can't remember where I got it. If you want to make code changes in the future, as I finally decided I did, then go to the "How to compile" page at this site, where Nick gives painfully easy steps to download and set up Cygwin and a version of Smaug ( smaug1.4a_mxp )that works just fine -- with bugs actually fixed :) Running Smaug from Cygwin instead of double-clicking a win icon is a tad more tedious, but the reward far outweighs the minor inconvenience, imho. Good luck, hope this helps!

-Buck.
tbgamecock@yahoo.com
"I am Homer of Borg. Prepare to be assim... ooooo, Doughnuts!"
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


21,717 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.