Re: Adding arguments to casting

From: George (greerga@CIRCLEMUD.ORG)
Date: 12/29/97


On Mon, 29 Dec 1997, John Evans wrote:

>I found one thing that anyone using this needs to keep in mind:
>
>mag_areas() calls mag_damage() at the end and passes argument which was
>passed to it from the function that called it. This means that mag_areas()
>has the opportunity to mangle or alter argument before giving it on to
>mag_damage(). When calling things like skip_spaces() and one_argument() it
>is a good idea to dupe the orig argument into a temp variable and play
>with the temp variable so that the arguement is left intact.

Actually, skip_spaces() is safe to call on it without duplicating.  Just
avoid one_argument, half_chop, and kin if the spell is passed around.

>I think that that concerns comes up in more than one of the functions, but
>if someone is being careful when playing with arguments all will be fine.
>
>I haven't massively tested the code but with tons of lines like:
>
>mudlogf(BRF, LVL_IMMORT, FALSE, "mag_damage(): argument = %s", argument);
>
>I have acsertained that argument gets bounced from function to function
>without any due stress on said argument. :)

Good.

>Now to get on with what I started out doing..... Coding a control weather
>spell that works for "better" or for "worse". *ducking*

argh.

>Please stay sober if you wish to drive. My seventeen year old little
>sister was suddenly turned into a national statistic on Oct. 4th, 1997.
>See you in the new year.
>In memory of Jill Fisher. Born: July 20, 1980.   Died: October 4, 1997

I'm sorry to hear that.

(I don't drink, ever.)

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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