Re: throw skill problems

From: Chris Maniar (rafo@kulthea.stacken.kth.se)
Date: 10/20/00


Okay, I'm going to resist the urge to rant and flame :)

You will want to declare those two variables locally - i.e. in the
function itself. So, it'll look something like this:

Oh, arg is declared globally btw. But even if you use arg, you'll still
need another variable for the rest of the string.

ACMD(do_throw)
{
 ...
 char   arg1[MAX_STRING_LENGTH];
 char   arg2[MAX_STRING_LENGTH];

 ...
}

Now... this is a very simple C fundamental. I really would suggest that
you buy a good book on C programming, or at the very least check out a
couple of tutorials around the web.

Like you (I presume), I started 'coding' muds before I learnt any
C. Looking back, I would have saved both myself and others a lot of
trouble if I had just taken the time to learn C before I tried coding a
mud. Trust me, you'll be better for it - and not only in the mud
context. Because I wanted to code a mud, I learnt C (eventually). Because
I learnt C, I now work as a software developer. It pays off, honest :)

On Fri, 20 Oct 2000, Alex Mann wrote:

> Sorry that was a typo in the e-mail I o have that line
>
> Where abouts would I need to declare arg1 and arg2, or another way, where is
> arg declared.
>
> > > two_arguments ( argument , arg1, arg2);


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT