Re: Redoing Advance...

From: Mike Breuer (mbreuer@new.rr.com)
Date: 11/09/01


From: "Pj Bean" <pj_bean@HOTMAIL.COM>
> Below is your code all fixed up, Should have 0 problems,

-- snip --

> char *name = NULL, position = NULL;
-- snip --
> argument = one_argument(argument, name);
> one_argument(argument,position);

This will definitely cause problems.  one_argument expects a buffer
(allocated memory).  The second call SHOULD generate a compiler error, since
position is a char, not a string.  The tests on these variables are also
invalid.

>      if (!(victim = get_char_vis(ch, name, NULL, FIND_CHAR_WORLD))) {

Perhaps I'm just using older code (bpl17), but my version of get_char_vis()
only takes three parameters.

> if (!strcmp(position,"immortal") || !strcmp(position,"Immortal"))

Circle includes str_cmp() (in utils.c) which is a case-insensitive version
of strcmp.  This gives a bit more flexibility, since it will catch things
like "iMmortal".

Mike

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST