Woh, I never really got it down specificly to save_other_helps, I just asumed it was hedit entirly. I just simply re-write it so that all the helps are saved in one linked list, and saves to help.dat. It removes all needs for save other helps. And its not that hard to do.

To cycle through the helps it'd be something like
for(pHelp = help_first ; pHelp ; pHelp = pHelp->next )

And thats how its saved. If you have thousands of helpfiles you could always impliment them into a hash to shorten the searching time.

Davion





From: "Jeremy Hill" <[EMAIL PROTECTED]>
To: <[email protected]>
Subject: Hedit and save_other_helps; a workaround
Date: Sun, 2 Mar 2003 06:59:07 -0600

Hello,

If you happen to have a version of hedit that has a function named save_other_helps in it, take a close look at the function, and you'll notice that it will destroy area files. Example on how to
cause problems:

- First, back up your areas!
- Stand in Mud School, or any other area with no helps in it at the moment.
- Create a new help without specifying an area name to create it in the area you are standing in:
'new blahblah', fill out the fields, etc.
- asave changed, or asave the area.
- Shell in to your server and tail <area>.are, or 'ls -l school.are' to note its size. It has saved
correctly.
- Now edit the help file once again; modify the text, for example.
- Once more, asave changed.
- Shell in to your server and tail <area>.are, or notice its size.  Oops.
- Congratulations, you now have an 80-byte (or so) area file!

One workaround (this is not particularly the best workaround, if you have discovered this problem yourself and have found a more elegant solution, your post would be appreciated):

Comment out all calls to save_other_helps and instead add this line to function hedit_level,
hedit_keyword, hedit_text, right before the final return:
SET_BIT(ch->in_room->area->area_flags, AREA_CHANGED);

Note that you may have a different version of hedit or a fixed version of hedit, and this may not
apply to you.

Thanks for your time,

Jeremy Hill


--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus


Reply via email to