On Wed, 7 Aug 1996, Brian Williams - Nashak wrote: > well, I can't figure something out.. with my autoexit code.. <I just > added secret doors, and a search command that finds them..> > here is the code, and can someone tell me what is crashing my mud? I > can't see it.. : > > void do_auto_exits(struct char_dat *ch) > { > int door; > > *buf = '\0'; > > for (door = 0; door < NUM_OF_DIRS; door++) ---> if (!IS_SET(EXIT(ch, door)->exit_info, EX_SECRET)) { | | Swap these two.. Always test if the exit is there, before test on info. | ---> if (EXIT(ch, door) && EXIT(ch, door)->to_room != NOWHERE) > if (IS_SET(EXIT(ch, door)->exit_info, EX_CLOSED)) > sprintf(buf, "%s-%s# ", buf, capdirs[door]); > else > sprintf(buf, "%s-%s ", buf, capdirs[door]); > } > > sprintf(buf2, "%sObvious Exits:%s %s%s\r\n", CCCYN(ch, C_NRM), > CCNRM(ch, C_NRM), *buf ? buf : "None! ", CCNRM(ch, C_NRM)); > > send_to_char(buf2, ch); > } > --- Erik Niese-Petersen Aka Quint The typo God Realms of Darkness IMP [matrix.xiii.com 6666. Playertesting] +-----------------------------------------------------------+ | 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/07/00 PST