could someone please help me with this function, it is suppose to be checking the values in the array to see if they are positive, and if they are not sending a error report. void check_start_rooms(void) { int count; extern room_rnum r_mortal_start_room[NUM_STARTROOMS +1]; extern sh_int immort_start_room; extern sh_int frozen_start_room; ************************************** Begin Problem Area ************************************** for (count = 1; count <= (NUM_STARTROOMS + 1); count++) if ((r_mortal_start_room[count] = real_room(r_mortal_start_room[count])) < 0) { if (count > 1) r_mortal_start_room[count] = real_room(r_mortal_start_room[1]); else { log("SYSERR: Mortal start room does not exist. Change in config.c."); exit(1); } } *************************************** End Problem Area *************************************** if ((r_immort_start_room = real_room(immort_start_room)) < 0) { if (!mini_mud) log("SYSERR: Warning: Immort start room does not exist. Change in config.c."); r_immort_start_room = r_mortal_start_room[1]; } if ((r_frozen_start_room = real_room(frozen_start_room)) < 0) { if (!mini_mud) log("SYSERR: Warning: Frozen start room does not exist. Change in config.c."); r_frozen_start_room = r_mortal_start_room[1]; } } +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/10/01 PDT