Re: [CODE] Cloak Object Spell

From: jmlemke (
Date: 09/30/96

> I am working on a spell that will allow people to kind of 'hide'
> objects by disguising them as something else.  Right now its
> pretty generic.  The only problem I am having is that it when I
> try and change the description of the object it appears to
> screw up the prototype of the object as well.  For example if I
> cast this spell on a long sword (obj vnum 1124) to disguise it as
> a dull blade every long sword that I create after that is messed
> up.  It will either have no short description or will have the
> short description of the dull blade. :(  I think the problem is
> in the free() part of the my code.  How can I erase the current
> description of the object and then set it to something else without
> screwing up the memory of my mud? 
Hmm, if I remember right, you don't have to worry about free()...
If you use str_dup, it will take care of all that for you :) I know with my
'string' command I was having problems almost exactly like you were, 
until I took out the various 'free()'s... So try it without them, and
maybe hopefully it will work :)

Pegasus of OnyxMUD

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

This archive was generated by hypermail 2b30 : 12/18/00 PST