Re: [newbie] help!!! "lsdinc@ELKNET.NET" at Jul 15, 97 09:44:46 pm

From: ;P (siv@CYBERENET.NET)
Date: 07/15/97


>
> i know, i know, get a c book...

sigh..once again...this has nothing to do with knowing c...this is
knowing how to read...read the code that is...there are many, many
examples of how commands can be written and their arguments interpreted...
but...i guess i'll give a little explaination...when you type in
something...the interpreter chops off the first word and compares it
with that big list in interpreter.c....then it sends all of the stuff
that you typed after the first word to the function that is specified in
that array....in that function you can use the functions
one_argument(arg, argument) to take the first word from the argument and
set the char string arg equal to it...if there are supposed to be
two arguments...there is a function for that...

if it is a special command...then you have to write a spec_proc for a
room, obj, or mob..and use the if (!CMD_IS("poo"))...there are so many
examples of this being used in spec_procs.c that i'm not gonna say
anything more about it...except that the argument thing works the same
way...it sends all of the crap that was typed after the first word as
argument...then you have to sort that into one or two arguments..or use
it as is...

                             ######  ####### #######  #####
                             #     #    #    #       #     #
                             #     #    #    #       #
                             ######     #    #####   #
                             #   #      #    #       #
                             #    #     #    #       #     #
                             #     #    #    #        #####

siv

"In case you missed the point - we're evil. EEEEVVVIIILLLLLLL!"
        The Scorched Earth Party -


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



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