[CODE] More About Arguments

From: Aaron Miller (Tarus50@CONCENTRIC.NET)
Date: 10/03/97


I am writing a (rather lengthy) function in magic.c, called do_grasp.
I followed the instructions on adding new commands in coding.doc, namely
the argument part. Heres what I have

int do_grasp(struct char_data * ch, char *argument, int cmd, int subcmd)
{
int argu;
/* other declarations that are irrelevent snipped */

skip_spaces(&argument);
one_argument(&argument, buf);
argu = atoi(buf); /* i need an integer to work worth */

sprintf(buf, "Argument: %d\r\n", argu);

/* snip rest of function, completely irrelevent */
}

I always, no matter what, get 0. What am I doing wrong, here? I followed
the instructions for using arguments as best I could. Thanks for
any/all help.


     +------------------------------------------------------------+
     | 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