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
➜ Player files not saving after an error free re-compile
|
Player files not saving after an error free re-compile
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Grymlar
(10 posts) Bio
|
| Date
| Wed 10 Dec 2003 11:56 PM (UTC) |
| Message
| | Ok, this is really bugging me, i can use the exe that comes with one of many smaug source's, even ones that say they are from VC++, and my players can quit and come back and have their equipment, but as soon as i do a recompile, not changing anything in the source files, players loose their equipment when they log off, this goes for titles, prompts, and about anything else that gets set, including the room they where in when they quit. This even happens if i save and then quit. Any help would be awsome, thanks in advance! | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #1 on Thu 11 Dec 2003 12:36 AM (UTC) |
| Message
| Sounds like your paths aren't set correctly, or something like that. If the binary exe works fine but the paths don't, sounds like you're either not starting from the proper directory, or not read/writing from the right spot.
Do player files read, just not write again? When they lose their equipment, does it go back to what it was when they came, or is it all gone? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #2 on Thu 11 Dec 2003 12:36 AM (UTC) |
| Message
| | This happened to me on a Smaug windows. I never did fix it, and it happened everytime a player quit. I don't know what caused it. Perhaps it was a permission error. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
| Posted by
| Grymlar
(10 posts) Bio
|
| Date
| Reply #3 on Thu 11 Dec 2003 01:00 AM (UTC) |
| Message
| well the thing is, the exe that comes with the distribution files saves things just fine, but when i make a new exe, and i'm not changing anything to the source code, it stops saving player files correctly, and i get this error message when players are connecting.
[*****] FILE: ../player/r/Rastlain LINE: 49
[*****] BUG: Fread_obj: incomplete object.
But if i use the exe that comes with the distribution these objects save fine, and my player's load fine. | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #4 on Thu 11 Dec 2003 01:12 AM (UTC) Amended on Thu 11 Dec 2003 01:13 AM (UTC) by David Haley
|
| Message
| Well, looks like the file saving format changed between the precompiled .exe and the .exe you compiled. If your compiled version can't read object files, something is going very wrong somewhere, and chances are it's not the distribution's fault.
Have you looked at the line it's reporting? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Grymlar
(10 posts) Bio
|
| Date
| Reply #5 on Thu 11 Dec 2003 01:52 AM (UTC) |
| Message
| | Ok, i am guessing the line it is reporting is in my character file. line 49 is a blank line in between 'end' for the object and the #END for the character file. But, it reads the exact same file and saves to it ok when i use the 'stock' exe that comes with the distribution, and i've tried 5 different popular downloads, same version, 1.4a, but from different sources. And i'm pretty new to C++ so i dont know exactly where to even start looking in the server code. Another thing is the 'stock' exe is 2.1mb, the one that is compiled is only 1.6mb, so is there a bunch of stuff being left out? I'm loading up the makefile, and doing a clean make, then compiling the exe. | | Top |
|
| Posted by
| Grymlar
(10 posts) Bio
|
| Date
| Reply #6 on Thu 11 Dec 2003 01:55 AM (UTC) |
| Message
| | oh, and it seems to read the object files just fine, they stay in the area files, and are still setup correctly, its just player files arent being saved, custom titles, bamfin and bamfout, carried and equiped items, the room they where in when they quit, basicly everything, and i got waitforauth set to 0 and they still dont auto advance to lvl 2 upon creation, hope this info helps, i'm at a total loss, like i said i'm pretty new to C++. | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #7 on Thu 11 Dec 2003 01:59 AM (UTC) |
| Message
| What system are you running on? What are you compiling with?
I meant that if the compiled version can't read objects in player files, then something is wrong; not just object files.
Have you read up on documents that explain how to compile and all that? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Grymlar
(10 posts) Bio
|
| Date
| Reply #8 on Thu 11 Dec 2003 02:05 AM (UTC) |
| Message
| I'm using win2000 proffesional and my compiler is VC++ 6.0, and i'm not getting any errors on the compile, i am getting one error, but it dosnt seem to be something that would affect this, it looks like this
D:\smaug\dist\src\stat_obj.c(147) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
all on one line of course, and stat_obj.c line 147 in my source file is
#undef TODUB(x)
its the second to last line in stat_obj.c but as i said its not just objects the player files arent saving, its basicly the whole player file, although the error upon logging on the server window is displaying shows that its pointing to the right directory, otherwise it would say player dosnt exist, right? | | Top |
|
| Posted by
| Grymlar
(10 posts) Bio
|
| Date
| Reply #9 on Thu 11 Dec 2003 02:06 AM (UTC) |
| Message
| | no errors, i am getting one warning, sorry. | | Top |
|
| Posted by
| Grymlar
(10 posts) Bio
|
| Date
| Reply #10 on Thu 11 Dec 2003 02:40 AM (UTC) |
| Message
| ok, i think i might have found it, i have smaug running "stock" (no re-compile just the exe that came with it) on drive D, and on drive C i got the one i recompiled running. I opened up a character file from each of them in word, so i could get a line count. The one that works, saves items and reloads player files has 50 lines, with line 49, the problimatic line on the other one being a blank line. On the one that dosnt load correctly, or save player files seemingly at all, line 49 is
end
this is becuase there is a line right before that that is
Values 5 5 0 0 0 0
and the values line isnt in the player file from the server that seems to be running correctly, and i am guessing it dont need to know the values of an object since it can look them up using the vnums, correct? So this means i need to locate where in save.c it is writing this line and take it out?
| | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #11 on Thu 11 Dec 2003 02:47 AM (UTC) |
| Message
| | Sounds like you are combining problems, sorry exes, here, but one possibility is that you don't have all the correct directories set up. Search this forum, there are quite a few posts about problems saving characters. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Grymlar
(10 posts) Bio
|
| Date
| Reply #12 on Thu 11 Dec 2003 03:12 AM (UTC) |
| Message
| | Hmm, ok, guess i downloaded and tried every zip file i could find except the ones from here, i installed the server, got myself up and going, gave myself some items, and then installed the source code, re-compiled it, ran that exe, and everything still works :) Thanks! the friends i'm building this mud with will be happy, they like me are long time mudders, i just happen to have a small bit of knowladge of coding, so i'm in charge of the server, i've installed snippets and such before, must have been using this set of code, thanks for the help, much appriciated! | | 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.
29,849 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top