Hello. I have been working on an on-line imotd/motd editor and thought
I was done when I ran into a problem I can't figure out. The problem is
that, when I enter the command (motd_edit), it simply freezes the game.
No shutdown, no core file, nothing. I have it defined in interpreter.c
with the ACMD and the :
{ "edit_motd", POS_RESTING, do_edit_motd, LVL_IMPL, 0},
line . I am stuck, wonder if anyone could help. This is the code I
have for it:
ACMD(do_edit_motd)
{
#define MOTD "text/motd"
int i = TRUE;
FILE *f;
char buf2[100];
f = fopen(MOTD,"w");
send_to_char("Enter a new MOTD below:\r\n", ch);
while(i != FALSE) {
send_to_char("] ", ch);
scanf("%s", buf2);
while(buf2 != "/s")
fprintf(f, "%s\r\n", buf2);
if(buf2 == "/s")
i = FALSE;
}
fclose(f);
}
PS - The IMOTD one is this but with IMOTD instead of MOTD.
Chuck
+------------------------------------------------------------+
| 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