Re: Prompt

From: Patrick Dughi (dughi@imaxx.net)
Date: 12/27/00


> Hello,
> Obiously I a real newbie coder. Here's my problem,  I'm trying to
> install this new prompt from the ftp site. My problem is I'm a real new
> coder and all the readme file says is "Minor changes are required to
> comm.c and structs.h, but you should easily figure out what." Any idea's
> to what these changes are would help.
>
        I normally don't do this, but I will start with a chastisement.

        You should not code if you cannot code. A simple truth. This
includes modifying your code.  I shan't rehash the old line about people
who run muds should be capable of running a mud (which is not soley
administration, it includes programming).

        Learn to program in C. Learn how circlemud works - perhaps both at
the same time.  Start with alterations that you consider 'within your
grasp'.  If you find that you cannot do it, find something easier.

        Because I'd rather you learn it on your own, I'll help you with
the circlemud-specific details required to install a prompt, and assume
you have full knowledge of the C specifics needed to make this addition.

        Comm.c is the file where the socket transactions take place - the
input and output of the data.  Somewhere in there - it's fairly obvious -
a character's input and output queues are dequeued.  You'll just want to
insert the prompt before each text string that's output (unless they're
reading a multi-page text string, via page_string.  I believe there's
already a check to suppress the normal prompt in that case, and instead
display the [(C)ontinue, ...(q)uit] bar.

        Alterations to structs.h are necessary because the player file
structure and the player in-game structure live there, so add space for
your prompt; it gets fwritten later - which means you don't have to worry
about specific load procedures.  What you may want to do though, is look
at the clear_char()  function that sets defaults for newly created
players, and set it to something reasonable.

        Hope this helps.  If not, I recommend Ditel/Ditel's "C: How to
Program" as a very indepth, yet learning & course oriented textbook for
the c language.  I still use it myself from time to time - though mostly
for terminology ;)

                                                PjD

--
   +---------------------------------------------------------------+
   | 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 : 04/11/01 PDT