I'm not trying to insert another argument into
damage(), I think you misread my original message.  I
want to use a string inputted from the mpdamage
function instead of dt into the damage() function. 
Ie:

mob damage 25 75 "pinch"
Output:
The gigantic crab's pinch MUTILATES YOU!
Instead of how it currently would be setup to do:
The gigantic crab's none MUTILATES YOU!

I am in no way changing how the damage() is defined. 
I just want to know if you can put a string in instead
of an integer.

--- Tom Whiting <[EMAIL PROTECTED]> wrote:
> Any time you change the calls to something you have
> to change the
> declares to it. This is what he wants
> Currently, damage is set to show actually 6
> arguments. He wants to add a
> 7th to it. This can NOT be done without redefining
> damage. By redefining
> damage you HAVE to redefine all the calls to said
> function.
> Go ahead, try to compile it here. You'll get a nice
> little error that
> says" Too many arguments to function "damage", as
> it's written right
> here".
> In fact, I just tried it  (though I KNEW you were
> wrong, I tried it
> anyways).I added just another random argument (a
> boolean statement) to
> the EXACT call he wanted to do it to.. Woops, you're
> wrong. You can NOT
> randomly insert arguments in ANY function like that.
> That's like writing
> the following function and expecting it to work.
> 
> void foo(CHAR_DATA *ch, char *argument)
> {
> blah
> return;
> }
> and somewhere inside of your code, adding the call
> to foo as :
> foo(ch, buf2,
>
heyIjustwannarandomlyinsertthingsinhereandhopeandpraymycompilertakesitwell);
> Or, even better,in your case, it'd be like (I wanna
> randomly insert
> arguments anywhere and pray they work correctly
> **chuckle**)
> 
> foo(buf2,ch);
> 
> 
> 
> then HOPING that the ch works, right?? Nope!!! Aint
> gonna cut it!!!
> 
> 
> On Fri, 2002-07-12 at 14:02,
> [EMAIL PROTECTED] wrote:
> > Huh?  You can change the functionality of a
> damage() type function without
> > even touching all the calls and protoypes.
> > 
> > The same way act() and act_new() works...
> > 
> > -----Original Message-----
> > From: Tom Whiting [mailto:[EMAIL PROTECTED]
> > Sent: Friday, July 12, 2002 2:59 PM
> > To: [email protected]
> > Subject: Re: Easy answer, I'm just braindead right
> now
> > 
> > 
> > 
> > > damage( ch, victim, fKill?number_range(low,high)
> :
> > > UMIN(blah), (fourth_argument), DAM_NONE, TRUE);
> > > 
> > > What will I put for the fourth argument in the
> damage
> > > line?  I know this is a simple answer, I'm just
> brain
> > > dead right now :P  Thanks.
> > > -Matt
> > 
> > So easy, in fact that you'll kick yourself once
> you hear the answer.
> > First, you need to realize that changing damage
> itself will invalidate
> > all functions requiring damage. You're not after
> mpdamage being changed
> > in the previous example, you're after damage()
> being changed(big big big
> > difference), and a HELL of a lot more work.
> > Now, why are you trying to insert the fourth
> argument in the MIDDLE of
> > everything? Put it at the END, where it should be.
> Why? Here's why:
> > Everything in damage() already works as is, out of
> the box, no?
> > Inserting crap in the MIDDLE of the statement or
> call to it will just
> > SERIOUSLY screw up your calls to the damage
> function (as if they
> > wouldn't be already by changing the damage code
> itself). Put
> > fourth_argument where it should be, at the END of
> the damage call!!
> > Remember, you have to not only change the calls to
> damage(), you ALSO
> > have to change the declaration of it in merc.h (if
> one exists), and ALL
> > other declarations of it.
> -- 
> TJW      :Head tech, designer, bum:P
> Mud      :http://dreamless.wolfstream.net
> telnet   :telnet://dreamless.wolfstream.net 9275
> OLC Pages:http://olc.wolfstream.net
> 
> 
> 
> -- 
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

Reply via email to