On December 6th at about 2:55, someone uploaded act.comm.c to ftp.circlemud.org. I know what has changed but would like some explanation of what this is meant for, what it should be called, or basically anything else about it. Thanks. Changes between the uploaded file and stock code are as follows: send_to_char("There's something written on it already.\r\n", ch); else { /* we can write - hooray! */ - send_to_char("Write your note. End with '@' on a new line.\r\n", ch); + /* this is the PERFECT code example of how to set up: + * a) the text editor with a message already loaed + * b) the abort buffer if the player aborts the message + */ + ch->desc->backstr = NULL; + send_to_char("Write your note. (/s saves /h for help)\r\n", ch); + /* ok, here we check for a message ALREADY on the paper */ + if (paper->action_description) { + /* we str_dup the original text to the descriptors->backstr */ + ch->desc->backstr = str_dup(paper->action_description); + /* send to the player what was on the paper (cause this is already */ + /* loaded into the editor) */ + send_to_char(paper->action_description, ch); + } act("$n begins to jot down a note.", TRUE, ch, 0, 0, TO_ROOM); + /* assign the descriptor's->str the value of the pointer to the text */ + /* pointer so that we can reallocate as needed (hopefully that made */ + /* sense :>) */ ch->desc->str = &paper->action_description; ch->desc->max_str = MAX_NOTE_LENGTH; } -- George Greer - Me@Null.net | Genius may have its limitations, but stupidity http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard +------------------------------------------------------------+ | 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