Re: C Question

From: jeremy jubenville (jeremy@yakko.cs.wmich.edu)
Date: 06/08/96


You'll have to pass the variable arg as a character array instead of just 
type char.  For example:

In interpreter.c:
 
declare the function in either nanny or at the top of the file as such

int parse_race(char *arg)

  this is know as the prototype :)

Then when you actually call the function in nanny, it should go something 
like this:

  load_result = parse_race(arg);
  if (load_result == RACE_UNDEFINED) ... blah blah...

then in class.c (or wherever you put the function)

int parse_race(char *arg) 
{
 ... ...  Put all your code in here...the entire argument that the user 
inputs will be passed to this function.

I'm not the best teacher, so I hope this helps. :)

Antioch@Dark Chronicles (dc.iglou.com 4000)

P.S.  Marilyn Manson rules!

---------------------------------------------------------------------------
<> Jeremy J. Jubenville                  Email: jeremy@iglou.com
<> 2977-3B Burlingame SW                 Phone: (616) 532-8573
<> Wyoming, Michigan 49509                 Fax: (616) 532-8345

 - After silence, that which comes nearest to expressing the inexpressable
   is music...
___________________________________________________________________________


On Sat, 8 Jun 1996, Josh Brittenham wrote:

>         Ok, heres the deal, I'm adding races to my mud, and I've added so
> many, that just 1 character in the menu won't work.  Like [H]uman.  Instead
> of that, i want 2 characters, like [Hu]man.  How would i change this line in
> order to make this a double character?
> 
> int parse_race(char arg)
> 
> Thanks in advance.
> 
> Josh
> 



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