Re: Redoing Advance...

From: Pj Bean (pj_bean@hotmail.com)
Date: 11/09/01


 > Below is your code all fixed up, Should have 0 problems,

-- snip --

 > char *name = NULL, position = NULL;
-- snip --
as i was
char *name = NULL, *position = NULL;
Use that ...
 > argument = one_argument(argument, name);
 > one_argument(argument,position);
No it works just fine ...it saves the cursor inside the string so you can
just use one_argument again to grab the second argument, it works just fine,
ive used it for years, btw ...its just a pointer to the string sent to the
function, its not an actualy char, no need for allocating memory

 >      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.
>
I've honestly never used this function since i come from merc
So i couldnt comment on that code

 > 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".
>
Im use to str_prefix usually being case insensitive and str_cmp not,
Thankyou for clearin it up.


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

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