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 ➜ Running the server ➜ BUGS

BUGS

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


Posted by Kris   USA  (198 posts)  Bio
Date Thu 12 Apr 2001 08:07 PM (UTC)
Message
I did some tweaking in the source code, so that the mud would no longer automatically make that stupid wizlist file whever it boots up. I also edited commands.dat and removed the 'makewizlist' command. For some reason, once I started messing with the source code originally, the mud started overwriting player files\wizlist file whether it was read-only or not. If I set Kris to read-only, it would stay that way just fine, but once I quit or saved within the mud, the player file would be altered, and the properties dialog would show the read-only toggle unchecked. Sigh.... So I decided to get around this today, and it worked. However, some other, totally unrelated problems started arising. When I tried to use 'purge', it started requiring me to specify a specific target (i.e. I type purge and it returns 'purge what?'). So, I looked in the source code, found the part where it says that, and copied the contents of the if-statement above that (the one that says "blah\you purge(s) the room etc etc"). So purge started working just fine after that. Now, I can't cast 'create' spells!! UUGHGHGHGHGH!!!!!!! What the bloody heck has this mud been smoking?! If I try to cast 'create spring', it returns: Log: [*****] BUG: spell_affect has no affects sn 36
If I try 'cast create', then it returns: Log: [*****] BUG: spell_affect has no affects sn 35
Could someone please tell me how I'm managing to screw it up the more I try to fix it?
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 13 Apr 2001 03:08 AM (UTC)
Message
It is hard to know what you have done to it. :)

You could always do a "diff" of your modified source compared to the original version. Something like this:

diff -c orig/source.c source.c > changes.txt

I am assuming you are using Cygnus, which I think you are.

This will give you a changes.txt file, which if it is short enough you can post here.

- Nick Gammon

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

Posted by Nivek   (15 posts)  Bio
Date Reply #2 on Sun 15 Apr 2001 05:50 PM (UTC)
Message
First, if you don't know how to code be careful about what you just go around changing, you can mess things up pretty quickly.

As for the wizlist, I don't know why you don't like it but, why didn't you simply remove do_wizlist from the command
table with cedit wizlist delete and save it? Then none can see it, and it doesn't take long to create that wizlist, it isn't like it is eating up precious process time. As for the purge what, that usually has to do with a level restriction, IE your not a high enough level to purge everything in a room.

What you have messed up could be anywhere, I would suggest doing the diff as suggested or if you are unsure about your coding skills, I would startover and use my cedit command so people can't see the wizlist.
Top

Posted by Kris   USA  (198 posts)  Bio
Date Reply #3 on Mon 16 Apr 2001 03:14 AM (UTC)
Message
It's not that I don't want people to see the wizlist. It's that I created my own wizlist, very customized and using some text-art I inserted. The problem is, the bloody server keeps automatically overriding it, even if I set it to read-only. I'm learning as I go here, but there's just too much information for me to process with such beginning knowledge of this field. I don't intend to just wipe out the code changes and give up; until now, all the changes I have made have been more than successful. I edited the source file that controls all the junk that happens when the server is first started up. Near the beginning (if I remember correctly), is a list of function calls, in the same order as they appear on the log when the server is starting up. I merely found the line making a call to make_wizlist, and deleted it. I don't see how that suddenly removes my ability to purge a room! Then, I treated the symptoms by replacing the potion of code that returned "purge what?" with the portion of code that successfully purges the room. I figured it had something to do with authorization access or whatever, but it was just a quick fix (I was busy working on some of those mob progs mentioned in this forum, which btw I was extremely close to fixing, and I needed full use of purge). Somehow, this caused that problem with the spells not working that I mentioned earlier (the purge problem was fixed tho, as was the wizlist annoyance). I apologize that I wasn't more detailed in my earlier post. Is there a way I can email one of you the source files I edited in the aforementioned endeavor? I ran the diff thing, and, even using the pause key, it still flashed on the screen too fast, and since I had made numerous other changes before (mainly just changing a word printed on the screen here and there; nothing major for the most part), I was unable to even locate the portion that was relevant. Either of you would have much more success in fixing that than I would (I'm sure it's just an ignorant, simple mistake on my part, that either of you could identify and repair quite easily if you had a look). I'm learning as I go, but until I get a better feel for all this, I really have no way of troubleshooting this problem without someone else having a look at it. I hope I'm not asking too much =)
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #4 on Mon 16 Apr 2001 11:05 PM (UTC)
Message
First, make_wizlist is called in about 6 places. It would be better to replace the contents of make_wizlist rather than comment out each time it is called.

The simple way is to just "return" as the first executable statement. Then you can always take the return out later. eg.



/*
 * Wizlist builder						-Thoric
 */
void make_wizlist( )
{
  DIR *dp;
  struct dirent *dentry;
  FILE *gfp;
  char *word;
  int ilevel, iflags;
  WIZENT *wiz, *wiznext;
  char buf[MAX_STRING_LENGTH];

  return;  /* wizlist disabled */
 
... blah blah ...

}



As for the diff, if you typed in what I had said the output is redirected to a file, eg.


diff -c orig/source.c source.c > changes.txt


The "> changes.txt" part says "send output to the file changes.txt".

You must have left that bit out.

I don't really want to get into custom debugging of everyone's changes to the SMAUG code. I am happy to give pointers to fixing problems that are likely to be of general interest, but once you start adding custom code (or making your own changes) you are on your own a bit.



- Nick Gammon

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

Posted by Kris   USA  (198 posts)  Bio
Date Reply #5 on Tue 17 Apr 2001 07:56 AM (UTC)
Message
I ended up restoring most of my source backups, only to eventually realize that the purge who? problem somehow occured as a direct result of me removing makewizlist from the commands.dat file. I'm still not sure what caused the spells problem; it was fixed when I restored the backups. However, I had to use a backup I had made about a month ago. I downloaded the zipped source code from this website, and it was extremely buggy. The compiler was finding warning errors in virtually every file. Act_info.c had an implicit delclaration of RENAME, but that was only a warning error. Then it got down to intrep.c, and aborted when it found a parse error. I noticed that the zip file was modified just this April, so perhaps something got corrupted or something? I then used my backup, made in March, and it worked just fine. I'm not sure if it's just me on this one; ya may wanna double check the source code up there and try compiling it yourself. Thanks for all the help on this subject =)
Top

Posted by Nivek   (15 posts)  Bio
Date Reply #6 on Tue 08 May 2001 07:11 AM (UTC)

Amended on Tue 20 Nov 2007 04:24 AM (UTC) by Nick Gammon

Message
What compile errors did you get and where did you download smaug from, if you got my patched version off my website, I may have slightly messed up some file while I was setting it up for compiling on windows. If you got it off smaug.org it shouldn't have been modified in April and I better start checking the logs on the server ;)
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.


20,752 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.